/**
 *
 */
import OpenApi;
import OpenApi.OpenApiUtil;

extends OpenApi;


init(config: OpenApiUtil.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('dataphin-public', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!$isNull(endpoint)) {
    return endpoint;
  }
  
  if (!$isNull(endpointMap) && !$isNull(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddTenantMembersRequest {
  addCommand?: {
    userList?: [ 
      {
        id?: string(name='Id', example='1323241'),
        roleList?: [ string ](name='RoleList'),
      }
    ](name='UserList', description='This parameter is required.'),
  }(name='AddCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model AddTenantMembersShrinkRequest {
  addCommandShrink?: string(name='AddCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model AddTenantMembersResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model AddTenantMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddTenantMembersResponseBody(name='body'),
}

/**
 * @summary 新增租户成员
 *
 * @param tmpReq AddTenantMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddTenantMembersResponse
 */
async function addTenantMembersWithOptions(tmpReq: AddTenantMembersRequest, runtime: $RuntimeOptions): AddTenantMembersResponse {
  tmpReq.validate();
  var request = new AddTenantMembersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.addCommand)) {
    request.addCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.addCommand, 'AddCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.addCommandShrink)) {
    body['AddCommand'] = request.addCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'AddTenantMembers',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增租户成员
 *
 * @param request AddTenantMembersRequest
 * @return AddTenantMembersResponse
 */
async function addTenantMembers(request: AddTenantMembersRequest): AddTenantMembersResponse {
  var runtime = new $RuntimeOptions{};
  return addTenantMembersWithOptions(request, runtime);
}

model AddTenantMembersBySourceUserRequest {
  addCommand?: {
    sourceUserList?: [ 
      {
        accountName?: string(name='AccountName', example='123@xx.com'),
        dingNumber?: string(name='DingNumber', example='123@dingding'),
        displayName?: string(name='DisplayName'),
        mail?: string(name='Mail', example='123@xx.com'),
        mobilePhone?: string(name='MobilePhone', example='13888888888'),
        sourceId?: string(name='SourceId', example='2323131'),
      }
    ](name='SourceUserList'),
  }(name='AddCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model AddTenantMembersBySourceUserShrinkRequest {
  addCommandShrink?: string(name='AddCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model AddTenantMembersBySourceUserResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model AddTenantMembersBySourceUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddTenantMembersBySourceUserResponseBody(name='body'),
}

/**
 * @summary 通过原始用户添加租户成员.
 *
 * @param tmpReq AddTenantMembersBySourceUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddTenantMembersBySourceUserResponse
 */
async function addTenantMembersBySourceUserWithOptions(tmpReq: AddTenantMembersBySourceUserRequest, runtime: $RuntimeOptions): AddTenantMembersBySourceUserResponse {
  tmpReq.validate();
  var request = new AddTenantMembersBySourceUserShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.addCommand)) {
    request.addCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.addCommand, 'AddCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.addCommandShrink)) {
    body['AddCommand'] = request.addCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'AddTenantMembersBySourceUser',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过原始用户添加租户成员.
 *
 * @param request AddTenantMembersBySourceUserRequest
 * @return AddTenantMembersBySourceUserResponse
 */
async function addTenantMembersBySourceUser(request: AddTenantMembersBySourceUserRequest): AddTenantMembersBySourceUserResponse {
  var runtime = new $RuntimeOptions{};
  return addTenantMembersBySourceUserWithOptions(request, runtime);
}

model AddUserGroupMemberRequest {
  addCommand?: {
    userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='132331'),
    userIdList?: [ string ](name='UserIdList'),
  }(name='AddCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model AddUserGroupMemberShrinkRequest {
  addCommandShrink?: string(name='AddCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model AddUserGroupMemberResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model AddUserGroupMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserGroupMemberResponseBody(name='body'),
}

/**
 * @summary 添加用户组成员.
 *
 * @param tmpReq AddUserGroupMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserGroupMemberResponse
 */
async function addUserGroupMemberWithOptions(tmpReq: AddUserGroupMemberRequest, runtime: $RuntimeOptions): AddUserGroupMemberResponse {
  tmpReq.validate();
  var request = new AddUserGroupMemberShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.addCommand)) {
    request.addCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.addCommand, 'AddCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.addCommandShrink)) {
    body['AddCommand'] = request.addCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'AddUserGroupMember',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加用户组成员.
 *
 * @param request AddUserGroupMemberRequest
 * @return AddUserGroupMemberResponse
 */
async function addUserGroupMember(request: AddUserGroupMemberRequest): AddUserGroupMemberResponse {
  var runtime = new $RuntimeOptions{};
  return addUserGroupMemberWithOptions(request, runtime);
}

model CheckDataSourceConnectivityRequest {
  checkCommand?: {
    configItemList?: [ 
      {
        key?: string(name='Key', description='This parameter is required.', example='k1'),
        value?: string(name='Value', description='This parameter is required.', example='v1'),
      }
    ](name='ConfigItemList', description='This parameter is required.'),
    type?: string(name='Type', description='This parameter is required.', example='MAX_COMPUTE'),
  }(name='CheckCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CheckDataSourceConnectivityShrinkRequest {
  checkCommandShrink?: string(name='CheckCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CheckDataSourceConnectivityResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model CheckDataSourceConnectivityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckDataSourceConnectivityResponseBody(name='body'),
}

/**
 * @summary 检查数据源连通性
 *
 * @param tmpReq CheckDataSourceConnectivityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckDataSourceConnectivityResponse
 */
async function checkDataSourceConnectivityWithOptions(tmpReq: CheckDataSourceConnectivityRequest, runtime: $RuntimeOptions): CheckDataSourceConnectivityResponse {
  tmpReq.validate();
  var request = new CheckDataSourceConnectivityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.checkCommand)) {
    request.checkCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.checkCommand, 'CheckCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.checkCommandShrink)) {
    body['CheckCommand'] = request.checkCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CheckDataSourceConnectivity',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 检查数据源连通性
 *
 * @param request CheckDataSourceConnectivityRequest
 * @return CheckDataSourceConnectivityResponse
 */
async function checkDataSourceConnectivity(request: CheckDataSourceConnectivityRequest): CheckDataSourceConnectivityResponse {
  var runtime = new $RuntimeOptions{};
  return checkDataSourceConnectivityWithOptions(request, runtime);
}

model CheckDataSourceConnectivityByIdRequest {
  id?: long(name='Id', description='This parameter is required.', example='123'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CheckDataSourceConnectivityByIdResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model CheckDataSourceConnectivityByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckDataSourceConnectivityByIdResponseBody(name='body'),
}

/**
 * @summary 检查已创建的数据源是否正常连通
 *
 * @param request CheckDataSourceConnectivityByIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckDataSourceConnectivityByIdResponse
 */
async function checkDataSourceConnectivityByIdWithOptions(request: CheckDataSourceConnectivityByIdRequest, runtime: $RuntimeOptions): CheckDataSourceConnectivityByIdResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CheckDataSourceConnectivityById',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 检查已创建的数据源是否正常连通
 *
 * @param request CheckDataSourceConnectivityByIdRequest
 * @return CheckDataSourceConnectivityByIdResponse
 */
async function checkDataSourceConnectivityById(request: CheckDataSourceConnectivityByIdRequest): CheckDataSourceConnectivityByIdResponse {
  var runtime = new $RuntimeOptions{};
  return checkDataSourceConnectivityByIdWithOptions(request, runtime);
}

model CheckResourcePermissionRequest {
  checkCommand?: {
    operate?: string(name='Operate', description='This parameter is required.', example='UPDATE'),
    resourceList?: [ 
      {
        resourceId?: string(name='ResourceId', description='This parameter is required.', example='hadoop.300000806.data_distill.behavior_gameinfor_01'),
      }
    ](name='ResourceList', description='This parameter is required.'),
    resourceType?: string(name='ResourceType', description='This parameter is required.', example='PHYSICAL_TABLE'),
    userId?: string(name='UserId', description='This parameter is required.', example='323231'),
  }(name='CheckCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CheckResourcePermissionShrinkRequest {
  checkCommandShrink?: string(name='CheckCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CheckResourcePermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  resourcePermissionList?: [ 
    {
      hasPermission?: boolean(name='HasPermission', example='true'),
      resourceId?: string(name='ResourceId', example='hadoop.300000806.data_distill.behavior_gameinfor_01'),
    }
  ](name='ResourcePermissionList'),
  success?: boolean(name='Success', example='true'),
}

model CheckResourcePermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckResourcePermissionResponseBody(name='body'),
}

/**
 * @summary 校验用户是否有指定资源权限点.
 *
 * @param tmpReq CheckResourcePermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckResourcePermissionResponse
 */
async function checkResourcePermissionWithOptions(tmpReq: CheckResourcePermissionRequest, runtime: $RuntimeOptions): CheckResourcePermissionResponse {
  tmpReq.validate();
  var request = new CheckResourcePermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.checkCommand)) {
    request.checkCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.checkCommand, 'CheckCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.checkCommandShrink)) {
    body['CheckCommand'] = request.checkCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CheckResourcePermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 校验用户是否有指定资源权限点.
 *
 * @param request CheckResourcePermissionRequest
 * @return CheckResourcePermissionResponse
 */
async function checkResourcePermission(request: CheckResourcePermissionRequest): CheckResourcePermissionResponse {
  var runtime = new $RuntimeOptions{};
  return checkResourcePermissionWithOptions(request, runtime);
}

model CreateAdHocFileRequest {
  createCommand?: {
    content?: string(name='Content', description='This parameter is required.', example='select 1;'),
    directory?: string(name='Directory', description='This parameter is required.', example='/xx1/xx2/'),
    name?: string(name='Name', description='This parameter is required.', example='test_xx'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='11212133'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateAdHocFileShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateAdHocFileResponseBody = {
  code?: string(name='Code', example='OK'),
  fileId?: long(name='FileId', example='1212313222'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model CreateAdHocFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAdHocFileResponseBody(name='body'),
}

/**
 * @summary 创建即席查询文件
 *
 * @param tmpReq CreateAdHocFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAdHocFileResponse
 */
async function createAdHocFileWithOptions(tmpReq: CreateAdHocFileRequest, runtime: $RuntimeOptions): CreateAdHocFileResponse {
  tmpReq.validate();
  var request = new CreateAdHocFileShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateAdHocFile',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建即席查询文件
 *
 * @param request CreateAdHocFileRequest
 * @return CreateAdHocFileResponse
 */
async function createAdHocFile(request: CreateAdHocFileRequest): CreateAdHocFileResponse {
  var runtime = new $RuntimeOptions{};
  return createAdHocFileWithOptions(request, runtime);
}

model CreateBatchTaskRequest {
  createCommand?: {
    dataSourceCatalog?: string(name='DataSourceCatalog', example='mysql_catalog'),
    dataSourceId?: string(name='DataSourceId', example='12131111'),
    dataSourceSchema?: string(name='DataSourceSchema', example='erp'),
    description?: string(name='Description', description='This parameter is required.', example='xx test.'),
    directory?: string(name='Directory', description='This parameter is required.', example='/a/b'),
    engine?: string(name='Engine', example='PYTHON3_7'),
    name?: string(name='Name', description='This parameter is required.', example='test111'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='10121101'),
    pythonModuleList?: [ string ](name='PythonModuleList'),
    scheduleType?: int32(name='ScheduleType', description='This parameter is required.', example='3'),
    taskType?: int32(name='TaskType', description='This parameter is required.', example='5'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateBatchTaskShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateBatchTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  createResult?: {
    fileId?: long(name='FileId', example='12113111'),
  }(name='CreateResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model CreateBatchTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBatchTaskResponseBody(name='body'),
}

/**
 * @summary 创建离线计算任务。
 *
 * @param tmpReq CreateBatchTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBatchTaskResponse
 */
async function createBatchTaskWithOptions(tmpReq: CreateBatchTaskRequest, runtime: $RuntimeOptions): CreateBatchTaskResponse {
  tmpReq.validate();
  var request = new CreateBatchTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateBatchTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建离线计算任务。
 *
 * @param request CreateBatchTaskRequest
 * @return CreateBatchTaskResponse
 */
async function createBatchTask(request: CreateBatchTaskRequest): CreateBatchTaskResponse {
  var runtime = new $RuntimeOptions{};
  return createBatchTaskWithOptions(request, runtime);
}

model CreateBizEntityRequest {
  createCommand?: {
    bizObject?: {
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', description='This parameter is required.', example='create_object_name'),
      name?: string(name='Name', description='This parameter is required.', example='create_object_code_name'),
      ownerUserId?: string(name='OwnerUserId', example='30010010'),
      parentId?: long(name='ParentId', example='116306'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
      type?: string(name='Type', description='This parameter is required.', example='NORMAL'),
    }(name='BizObject'),
    bizProcess?: {
      bizEventEntityIdList?: [ long ](name='BizEventEntityIdList'),
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', description='This parameter is required.', example='create_process_name'),
      name?: string(name='Name', description='This parameter is required.', example='create_process_code_name'),
      ownerUserId?: string(name='OwnerUserId', example='30010010'),
      preBizProcessIdList?: [ long ](name='PreBizProcessIdList'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
      type?: string(name='Type', description='This parameter is required.', example='BIZ_EVENT'),
    }(name='BizProcess'),
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='6798087749072704'),
    dataDomainId?: long(name='DataDomainId', description='This parameter is required.', example='20101011'),
    type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateBizEntityShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateBizEntityResponseBody = {
  code?: string(name='Code', example='OK'),
  createResult?: {
    bizEntityId?: long(name='BizEntityId', example='12113111'),
  }(name='CreateResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model CreateBizEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBizEntityResponseBody(name='body'),
}

/**
 * @summary 创建业务实体。
 *
 * @param tmpReq CreateBizEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBizEntityResponse
 */
async function createBizEntityWithOptions(tmpReq: CreateBizEntityRequest, runtime: $RuntimeOptions): CreateBizEntityResponse {
  tmpReq.validate();
  var request = new CreateBizEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateBizEntity',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建业务实体。
 *
 * @param request CreateBizEntityRequest
 * @return CreateBizEntityResponse
 */
async function createBizEntity(request: CreateBizEntityRequest): CreateBizEntityResponse {
  var runtime = new $RuntimeOptions{};
  return createBizEntityWithOptions(request, runtime);
}

model CreateBizUnitRequest {
  createCommand?: {
    bizUnitAccountList?: [ 
      {
        userId?: string(name='UserId', description='This parameter is required.', example='20001201'),
      }
    ](name='BizUnitAccountList', description='This parameter is required.'),
    description?: string(name='Description', example='test'),
    displayName?: string(name='DisplayName', description='This parameter is required.', example='create_object_name'),
    icon?: string(name='Icon', description='This parameter is required.', example='icon-environment'),
    mode?: string(name='Mode', example='DEV_PROD'),
    name?: string(name='Name', description='This parameter is required.', example='create_object_code_name'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateBizUnitShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateBizUnitResponseBody = {
  code?: string(name='Code', example='OK'),
  createResult?: {
    bizUnitId?: long(name='BizUnitId', example='545844456'),
  }(name='CreateResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model CreateBizUnitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBizUnitResponseBody(name='body'),
}

/**
 * @summary 创建数据板块。
 *
 * @param tmpReq CreateBizUnitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBizUnitResponse
 */
async function createBizUnitWithOptions(tmpReq: CreateBizUnitRequest, runtime: $RuntimeOptions): CreateBizUnitResponse {
  tmpReq.validate();
  var request = new CreateBizUnitShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateBizUnit',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建数据板块。
 *
 * @param request CreateBizUnitRequest
 * @return CreateBizUnitResponse
 */
async function createBizUnit(request: CreateBizUnitRequest): CreateBizUnitResponse {
  var runtime = new $RuntimeOptions{};
  return createBizUnitWithOptions(request, runtime);
}

model CreateDataDomainRequest {
  createCommand?: {
    abbreviation?: string(name='Abbreviation', description='This parameter is required.', example='dm_code_name'),
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='545844456'),
    description?: string(name='Description', example='test'),
    displayName?: string(name='DisplayName', description='This parameter is required.', example='主题域测试'),
    name?: string(name='Name', description='This parameter is required.', example='dm_code_name'),
    parentId?: long(name='ParentId', example='10232311'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDataDomainShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDataDomainResponseBody = {
  code?: string(name='Code', example='OK'),
  createResult?: {
    dataDomainId?: long(name='DataDomainId', example='1241844456'),
  }(name='CreateResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model CreateDataDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDataDomainResponseBody(name='body'),
}

/**
 * @summary 创建主题域。
 *
 * @param tmpReq CreateDataDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDataDomainResponse
 */
async function createDataDomainWithOptions(tmpReq: CreateDataDomainRequest, runtime: $RuntimeOptions): CreateDataDomainResponse {
  tmpReq.validate();
  var request = new CreateDataDomainShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDataDomain',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建主题域。
 *
 * @param request CreateDataDomainRequest
 * @return CreateDataDomainResponse
 */
async function createDataDomain(request: CreateDataDomainRequest): CreateDataDomainResponse {
  var runtime = new $RuntimeOptions{};
  return createDataDomainWithOptions(request, runtime);
}

model CreateDataServiceApiRequest {
  createCommand?: {
    apiGroupId?: long(name='ApiGroupId', description='This parameter is required.', example='101'),
    apiGroupName?: string(name='ApiGroupName', description='This parameter is required.'),
    apiName?: string(name='ApiName', description='This parameter is required.', example='API_01'),
    apiType?: int32(name='ApiType', description='This parameter is required.', example='3'),
    bizProtocol?: [ int32 ](name='BizProtocol', description='This parameter is required.'),
    cacheTimeout?: int32(name='CacheTimeout', description='This parameter is required.', example='600'),
    callMode?: int32(name='CallMode', example='1'),
    customUpdateRate?: string(name='CustomUpdateRate'),
    description?: string(name='Description', example='test'),
    executionTimeout?: int32(name='ExecutionTimeout', example='30'),
    mode?: int32(name='Mode', description='This parameter is required.', example='0'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='123'),
    requestType?: int32(name='RequestType', description='This parameter is required.', example='1'),
    scriptDetails?: {
      datasourceID?: long(name='DatasourceID', example='6668888888888812345L'),
      datasourceType?: int32(name='DatasourceType', description='This parameter is required.', example='1'),
      isPaginated?: boolean(name='IsPaginated', example='false'),
      script?: string(name='Script', description='This parameter is required.', example='select a,b,c from table1 where d = ${d}'),
      scriptRequestParameters?: [ 
        {
          exampleValue?: string(name='ExampleValue', example='test'),
          isRequiredParameter?: boolean(name='IsRequiredParameter', description='This parameter is required.', example='false'),
          parameterDataType?: string(name='ParameterDataType', description='This parameter is required.', example='STRING'),
          parameterDescription?: string(name='ParameterDescription'),
          parameterName?: string(name='ParameterName', description='This parameter is required.', example='d'),
          parameterValueType?: string(name='ParameterValueType', description='This parameter is required.', example='='),
        }
      ](name='ScriptRequestParameters', description='This parameter is required.'),
      scriptResponseParameters?: [ 
        {
          exampleValue?: string(name='ExampleValue', example='amazing'),
          parameterDataType?: string(name='ParameterDataType', description='This parameter is required.', example='STRING'),
          parameterDescription?: string(name='ParameterDescription'),
          parameterName?: string(name='ParameterName', description='This parameter is required.', example='a'),
        }
      ](name='ScriptResponseParameters', description='This parameter is required.'),
      sortPriority?: int32(name='SortPriority', example='2'),
      sqlMode?: int32(name='SqlMode', description='This parameter is required.', example='1'),
    }(name='ScriptDetails', description='This parameter is required.'),
    timeout?: int32(name='Timeout', description='This parameter is required.', example='30'),
    updateRate?: int32(name='UpdateRate', example='1'),
    version?: string(name='Version', description='This parameter is required.', example='V1'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDataServiceApiShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDataServiceApiResponseBody = {
  apiId?: long(name='ApiId', example='10086'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='internal error'),
  requestId?: string(name='RequestId', description='Id of the request', example='82E78D6B-AA8F-1FEF-8AA3-5C9DA2A79140'),
  success?: boolean(name='Success'),
}

model CreateDataServiceApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDataServiceApiResponseBody(name='body'),
}

/**
 * @summary 创建新的数据服务API并提交。
 *
 * @param tmpReq CreateDataServiceApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDataServiceApiResponse
 */
async function createDataServiceApiWithOptions(tmpReq: CreateDataServiceApiRequest, runtime: $RuntimeOptions): CreateDataServiceApiResponse {
  tmpReq.validate();
  var request = new CreateDataServiceApiShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDataServiceApi',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建新的数据服务API并提交。
 *
 * @param request CreateDataServiceApiRequest
 * @return CreateDataServiceApiResponse
 */
async function createDataServiceApi(request: CreateDataServiceApiRequest): CreateDataServiceApiResponse {
  var runtime = new $RuntimeOptions{};
  return createDataServiceApiWithOptions(request, runtime);
}

model CreateDataSourceRequest {
  createCommand?: {
    devDataSourceCreate?: {
      dataSourceCreate?: {
        checkActivity?: boolean(name='CheckActivity', example='true'),
        configItemList?: [ 
          {
            key?: string(name='Key', description='This parameter is required.', example='k1'),
            value?: string(name='Value', description='This parameter is required.', example='v1'),
          }
        ](name='ConfigItemList', description='This parameter is required.'),
        description?: string(name='Description', example='datasource for xxx in dev'),
        name?: string(name='Name', description='This parameter is required.', example='dp_test_dev'),
        type?: string(name='Type', description='This parameter is required.', example='MAX_COMPUTE'),
      }(name='DataSourceCreate', description='数据源创建结构体'),
      prodDataSourceId?: long(name='ProdDataSourceId', example='1011'),
    }(name='DevDataSourceCreate'),
    prodDataSourceCreate?: {
      checkActivity?: boolean(name='CheckActivity', example='true'),
      configItemList?: [ 
        {
          key?: string(name='Key', description='This parameter is required.', example='k1'),
          value?: string(name='Value', description='This parameter is required.', example='v1'),
        }
      ](name='ConfigItemList', description='This parameter is required.'),
      description?: string(name='Description', example='datasource for xx'),
      name?: string(name='Name', description='This parameter is required.', example='dp_test'),
      type?: string(name='Type', description='This parameter is required.', example='MAX_COMPUTE'),
    }(name='ProdDataSourceCreate', description='数据源创建结构体'),
  }(name='CreateCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDataSourceShrinkRequest {
  createCommandShrink?: string(name='CreateCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDataSourceResponseBody = {
  code?: string(name='Code', example='OK'),
  createResult?: {
    devDataSourceId?: long(name='DevDataSourceId', example='123'),
    prodDataSourceId?: long(name='ProdDataSourceId', example='12345'),
  }(name='CreateResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model CreateDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDataSourceResponseBody(name='body'),
}

/**
 * @summary 新建数据源
 *
 * @param tmpReq CreateDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDataSourceResponse
 */
async function createDataSourceWithOptions(tmpReq: CreateDataSourceRequest, runtime: $RuntimeOptions): CreateDataSourceResponse {
  tmpReq.validate();
  var request = new CreateDataSourceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDataSource',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新建数据源
 *
 * @param request CreateDataSourceRequest
 * @return CreateDataSourceResponse
 */
async function createDataSource(request: CreateDataSourceRequest): CreateDataSourceResponse {
  var runtime = new $RuntimeOptions{};
  return createDataSourceWithOptions(request, runtime);
}

model CreateDirectoryRequest {
  createCommand?: {
    category?: string(name='Category', description='This parameter is required.', example='tempCode'),
    directory?: string(name='Directory', description='This parameter is required.', example='/'),
    name?: string(name='Name', description='This parameter is required.', example='test_xx'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='1212344'),
  }(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDirectoryShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateDirectoryResponseBody = {
  code?: string(name='Code', example='OK'),
  fileId?: long(name='FileId', example='1311113211'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model CreateDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDirectoryResponseBody(name='body'),
}

/**
 * @summary 创建菜单树文件目录
 *
 * @param tmpReq CreateDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDirectoryResponse
 */
async function createDirectoryWithOptions(tmpReq: CreateDirectoryRequest, runtime: $RuntimeOptions): CreateDirectoryResponse {
  tmpReq.validate();
  var request = new CreateDirectoryShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDirectory',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建菜单树文件目录
 *
 * @param request CreateDirectoryRequest
 * @return CreateDirectoryResponse
 */
async function createDirectory(request: CreateDirectoryRequest): CreateDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return createDirectoryWithOptions(request, runtime);
}

model CreateNodeSupplementRequest {
  createCommand?: {
    containAllDownStream?: boolean(name='ContainAllDownStream'),
    downStreamNodeIdList?: [ 
      {
        fieldIdList?: [ string ](name='FieldIdList'),
        id?: string(name='Id'),
      }
    ](name='DownStreamNodeIdList'),
    endBizDate?: string(name='EndBizDate', description='This parameter is required.', example='2021-06-01'),
    filterList?: [ 
      {
        exclude?: boolean(name='Exclude'),
        key?: string(name='Key'),
        valueList?: [ string ](name='ValueList'),
      }
    ](name='FilterList'),
    globalParamList?: [ 
      {
        key?: string(name='Key'),
        value?: string(name='Value'),
      }
    ](name='GlobalParamList'),
    maxDueTime?: string(name='MaxDueTime'),
    minDueTime?: string(name='MinDueTime'),
    name?: string(name='Name', example='xx测试'),
    nodeIdList?: [ 
      {
        fieldIdList?: [ string ](name='FieldIdList'),
        id?: string(name='Id', description='This parameter is required.'),
      }
    ](name='NodeIdList', description='This parameter is required.'),
    nodeParamsList?: [ 
      {
        nodeId?: string(name='NodeId'),
        paramList?: [ 
          {
            key?: string(name='Key'),
            value?: string(name='Value'),
          }
        ](name='ParamList'),
      }
    ](name='NodeParamsList'),
    parallelism?: int32(name='Parallelism'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='101121'),
    startBizDate?: string(name='StartBizDate', description='This parameter is required.', example='2021-06-01'),
  }(name='CreateCommand', description='This parameter is required.'),
  env?: string(name='Env', example='DEV/PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateNodeSupplementShrinkRequest {
  createCommandShrink?: string(name='CreateCommand', description='This parameter is required.'),
  env?: string(name='Env', example='DEV/PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateNodeSupplementResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  submitId?: string(name='SubmitId', example='f_2264518792396800000_20210223_2329354897145659392'),
  success?: boolean(name='Success', example='true/false'),
}

model CreateNodeSupplementResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateNodeSupplementResponseBody(name='body'),
}

/**
 * @summary 通用补数据接口 1.会生成补数据实例运行：影响相关产产出表数据 2.会进行任务运行：造成计算的费用以及存储的费用
 *
 * @param tmpReq CreateNodeSupplementRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateNodeSupplementResponse
 */
async function createNodeSupplementWithOptions(tmpReq: CreateNodeSupplementRequest, runtime: $RuntimeOptions): CreateNodeSupplementResponse {
  tmpReq.validate();
  var request = new CreateNodeSupplementShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateNodeSupplement',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通用补数据接口 1.会生成补数据实例运行：影响相关产产出表数据 2.会进行任务运行：造成计算的费用以及存储的费用
 *
 * @param request CreateNodeSupplementRequest
 * @return CreateNodeSupplementResponse
 */
async function createNodeSupplement(request: CreateNodeSupplementRequest): CreateNodeSupplementResponse {
  var runtime = new $RuntimeOptions{};
  return createNodeSupplementWithOptions(request, runtime);
}

model CreatePipelineNodeRequest {
  createPipelineNodeCommand?: {
    fileInfo?: {
      description?: string(name='Description', example='desc'),
      directory?: string(name='Directory', example='test'),
      fileName?: string(name='FileName', description='This parameter is required.', example='test_pipeline'),
    }(name='FileInfo', description='This parameter is required.'),
    nodeType?: string(name='NodeType', description='This parameter is required.', example='REAL_TIME'),
    pipelineName?: string(name='PipelineName', description='This parameter is required.', example='test_pipeline'),
    pipelineType?: string(name='PipelineType', description='This parameter is required.', example='REAL_TIME_PIPELINE'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='7091124176569088'),
  }(name='CreatePipelineNodeCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreatePipelineNodeShrinkRequest {
  createPipelineNodeCommandShrink?: string(name='CreatePipelineNodeCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreatePipelineNodeResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    errorCodeList?: [ string ](name='ErrorCodeList'),
    errorMessageList?: [ string ](name='ErrorMessageList'),
    pipelineId?: long(name='PipelineId', example='33749'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model CreatePipelineNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePipelineNodeResponseBody(name='body'),
}

/**
 * @summary 创建数据集成任务。
 *
 * @param tmpReq CreatePipelineNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePipelineNodeResponse
 */
async function createPipelineNodeWithOptions(tmpReq: CreatePipelineNodeRequest, runtime: $RuntimeOptions): CreatePipelineNodeResponse {
  tmpReq.validate();
  var request = new CreatePipelineNodeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createPipelineNodeCommand)) {
    request.createPipelineNodeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createPipelineNodeCommand, 'CreatePipelineNodeCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createPipelineNodeCommandShrink)) {
    body['CreatePipelineNodeCommand'] = request.createPipelineNodeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreatePipelineNode',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建数据集成任务。
 *
 * @param request CreatePipelineNodeRequest
 * @return CreatePipelineNodeResponse
 */
async function createPipelineNode(request: CreatePipelineNodeRequest): CreatePipelineNodeResponse {
  var runtime = new $RuntimeOptions{};
  return createPipelineNodeWithOptions(request, runtime);
}

model CreateRowPermissionRequest {
  createRowPermissionCommand?: {
    mappingColumns?: [ 
      {
        columnDesc?: string(name='ColumnDesc'),
        columnName?: string(name='ColumnName', description='This parameter is required.', example='business_id'),
        columnType?: string(name='ColumnType', description='This parameter is required.', example='STRING'),
      }
    ](name='MappingColumns', description='This parameter is required.'),
    rowPermissionDesc?: string(name='RowPermissionDesc'),
    rowPermissionName?: string(name='RowPermissionName', description='This parameter is required.'),
    rules?: [ 
      {
        expressions?: [ 
          {
            mappingColumnName?: string(name='MappingColumnName', description='This parameter is required.', example='id'),
            operator?: string(name='Operator', description='This parameter is required.', example='EQUAL'),
            subConditions?: [ any ](name='SubConditions', description='This parameter is required.'),
            type?: string(name='Type', description='This parameter is required.', example='RELATION'),
            values?: [ string ](name='Values', description='This parameter is required.'),
          }
        ](name='Expressions', description='This parameter is required.'),
        isDelete?: boolean(name='IsDelete', example='1'),
        ruleName?: string(name='RuleName', description='This parameter is required.'),
        scopeType?: string(name='ScopeType', description='This parameter is required.', example='SELECT_COLUMN'),
        status?: int32(name='Status', description='This parameter is required.', example='1'),
        userMappingList?: [ 
          {
            accountType?: string(name='AccountType', description='This parameter is required.', example='PERSONAL'),
            accounts?: [ 
              {
                accountId?: string(name='AccountId', description='This parameter is required.', example='300001111'),
              }
            ](name='Accounts', description='This parameter is required.', example='PERSONAL'),
          }
        ](name='UserMappingList'),
      }
    ](name='Rules'),
    tables?: [ 
      {
        columnName?: string(name='ColumnName', description='This parameter is required.', example='business_id'),
        mappingColumnName?: string(name='MappingColumnName', description='This parameter is required.', example='business_id'),
        resourceId?: string(name='ResourceId', description='This parameter is required.', example='odps.300199897.project_name.table_name'),
      }
    ](name='Tables'),
  }(name='CreateRowPermissionCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateRowPermissionShrinkRequest {
  createRowPermissionCommandShrink?: string(name='CreateRowPermissionCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateRowPermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: long(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model CreateRowPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRowPermissionResponseBody(name='body'),
}

/**
 * @summary 创建行级权限
 *
 * @param tmpReq CreateRowPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRowPermissionResponse
 */
async function createRowPermissionWithOptions(tmpReq: CreateRowPermissionRequest, runtime: $RuntimeOptions): CreateRowPermissionResponse {
  tmpReq.validate();
  var request = new CreateRowPermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createRowPermissionCommand)) {
    request.createRowPermissionCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createRowPermissionCommand, 'CreateRowPermissionCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createRowPermissionCommandShrink)) {
    body['CreateRowPermissionCommand'] = request.createRowPermissionCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateRowPermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建行级权限
 *
 * @param request CreateRowPermissionRequest
 * @return CreateRowPermissionResponse
 */
async function createRowPermission(request: CreateRowPermissionRequest): CreateRowPermissionResponse {
  var runtime = new $RuntimeOptions{};
  return createRowPermissionWithOptions(request, runtime);
}

model CreateStreamBatchJobMappingRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  streamBatchJobMappingCreateCommand?: {
    clusterId?: string(name='ClusterId', description='This parameter is required.', example='61187014-a3ba-4cdd-8609-1f0aa3df4a3d'),
    description?: string(name='Description', example='这是一段任务的描述信息'),
    directory?: string(name='Directory', description='This parameter is required.', example='/karel'),
    engineVersion?: string(name='EngineVersion', description='This parameter is required.', example='vvr-8.0.9-flink-1.17'),
    env?: string(name='Env', description='This parameter is required.', example='DEV'),
    fileName?: string(name='FileName', description='This parameter is required.', example='karel_hover_3'),
    fileType?: string(name='FileType', description='This parameter is required.', example='FLINK_SQL'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='7081229106458752'),
    queueName?: string(name='QueueName', description='This parameter is required.', example='default-queue'),
    vvpClusterType?: string(name='VvpClusterType', description='This parameter is required.', example='PREJOB'),
  }(name='StreamBatchJobMappingCreateCommand', description='This parameter is required.'),
}

model CreateStreamBatchJobMappingShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  streamBatchJobMappingCreateCommandShrink?: string(name='StreamBatchJobMappingCreateCommand', description='This parameter is required.'),
}

model CreateStreamBatchJobMappingResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    fileId?: string(name='FileId', example='7083701105376640'),
    url?: string(name='Url', example='/dev/streamJob/7083701105376640?env=DEV&projectId=7081229106458752&tenantId=300001420'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model CreateStreamBatchJobMappingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateStreamBatchJobMappingResponseBody(name='body'),
}

/**
 * @summary 创建流批一体任务
 *
 * @param tmpReq CreateStreamBatchJobMappingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateStreamBatchJobMappingResponse
 */
async function createStreamBatchJobMappingWithOptions(tmpReq: CreateStreamBatchJobMappingRequest, runtime: $RuntimeOptions): CreateStreamBatchJobMappingResponse {
  tmpReq.validate();
  var request = new CreateStreamBatchJobMappingShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.streamBatchJobMappingCreateCommand)) {
    request.streamBatchJobMappingCreateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.streamBatchJobMappingCreateCommand, 'StreamBatchJobMappingCreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.streamBatchJobMappingCreateCommandShrink)) {
    body['StreamBatchJobMappingCreateCommand'] = request.streamBatchJobMappingCreateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateStreamBatchJobMapping',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建流批一体任务
 *
 * @param request CreateStreamBatchJobMappingRequest
 * @return CreateStreamBatchJobMappingResponse
 */
async function createStreamBatchJobMapping(request: CreateStreamBatchJobMappingRequest): CreateStreamBatchJobMappingResponse {
  var runtime = new $RuntimeOptions{};
  return createStreamBatchJobMappingWithOptions(request, runtime);
}

model CreateUserGroupRequest {
  createCommand?: {
    active?: boolean(name='Active', example='true'),
    adminUserIdList?: [ string ](name='AdminUserIdList'),
    description?: string(name='Description', example='xx'),
    name?: string(name='Name'),
  }(name='CreateCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateUserGroupShrinkRequest {
  createCommandShrink?: string(name='CreateCommand'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model CreateUserGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  userGroupId?: string(name='UserGroupId', example='2313131'),
}

model CreateUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateUserGroupResponseBody(name='body'),
}

/**
 * @summary 新建用户组.
 *
 * @param tmpReq CreateUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateUserGroupResponse
 */
async function createUserGroupWithOptions(tmpReq: CreateUserGroupRequest, runtime: $RuntimeOptions): CreateUserGroupResponse {
  tmpReq.validate();
  var request = new CreateUserGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.createCommand)) {
    request.createCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.createCommand, 'CreateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.createCommandShrink)) {
    body['CreateCommand'] = request.createCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateUserGroup',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新建用户组.
 *
 * @param request CreateUserGroupRequest
 * @return CreateUserGroupResponse
 */
async function createUserGroup(request: CreateUserGroupRequest): CreateUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return createUserGroupWithOptions(request, runtime);
}

model DeleteAdHocFileRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12121111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='12132323'),
}

model DeleteAdHocFileResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model DeleteAdHocFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAdHocFileResponseBody(name='body'),
}

/**
 * @summary 删除菜单树即席查询文件
 *
 * @param request DeleteAdHocFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAdHocFileResponse
 */
async function deleteAdHocFileWithOptions(request: DeleteAdHocFileRequest, runtime: $RuntimeOptions): DeleteAdHocFileResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteAdHocFile',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除菜单树即席查询文件
 *
 * @param request DeleteAdHocFileRequest
 * @return DeleteAdHocFileResponse
 */
async function deleteAdHocFile(request: DeleteAdHocFileRequest): DeleteAdHocFileResponse {
  var runtime = new $RuntimeOptions{};
  return deleteAdHocFileWithOptions(request, runtime);
}

model DeleteBatchTaskRequest {
  deleteCommand?: {
    comment?: string(name='Comment', description='This parameter is required.', example='test task'),
    fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  }(name='DeleteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteBatchTaskShrinkRequest {
  deleteCommandShrink?: string(name='DeleteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteBatchTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='True'),
}

model DeleteBatchTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBatchTaskResponseBody(name='body'),
}

/**
 * @summary 删除离线计算任务，如果任务还没下线需要先下线再删除。
 *
 * @param tmpReq DeleteBatchTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBatchTaskResponse
 */
async function deleteBatchTaskWithOptions(tmpReq: DeleteBatchTaskRequest, runtime: $RuntimeOptions): DeleteBatchTaskResponse {
  tmpReq.validate();
  var request = new DeleteBatchTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.deleteCommand)) {
    request.deleteCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deleteCommand, 'DeleteCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.deleteCommandShrink)) {
    body['DeleteCommand'] = request.deleteCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteBatchTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除离线计算任务，如果任务还没下线需要先下线再删除。
 *
 * @param request DeleteBatchTaskRequest
 * @return DeleteBatchTaskResponse
 */
async function deleteBatchTask(request: DeleteBatchTaskRequest): DeleteBatchTaskResponse {
  var runtime = new $RuntimeOptions{};
  return deleteBatchTaskWithOptions(request, runtime);
}

model DeleteBizEntityRequest {
  bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='6798087749072704'),
  id?: long(name='Id', description='This parameter is required.', example='101001201'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
}

model DeleteBizEntityResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model DeleteBizEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBizEntityResponseBody(name='body'),
}

/**
 * @summary 删除业务实体。
 *
 * @param request DeleteBizEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBizEntityResponse
 */
async function deleteBizEntityWithOptions(request: DeleteBizEntityRequest, runtime: $RuntimeOptions): DeleteBizEntityResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.bizUnitId)) {
    query['BizUnitId'] = request.bizUnitId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteBizEntity',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除业务实体。
 *
 * @param request DeleteBizEntityRequest
 * @return DeleteBizEntityResponse
 */
async function deleteBizEntity(request: DeleteBizEntityRequest): DeleteBizEntityResponse {
  var runtime = new $RuntimeOptions{};
  return deleteBizEntityWithOptions(request, runtime);
}

model DeleteBizUnitRequest {
  id?: long(name='Id', description='This parameter is required.', example='6798087749072704'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteBizUnitResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model DeleteBizUnitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBizUnitResponseBody(name='body'),
}

/**
 * @summary 删除数据板块。
 *
 * @param request DeleteBizUnitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBizUnitResponse
 */
async function deleteBizUnitWithOptions(request: DeleteBizUnitRequest, runtime: $RuntimeOptions): DeleteBizUnitResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteBizUnit',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除数据板块。
 *
 * @param request DeleteBizUnitRequest
 * @return DeleteBizUnitResponse
 */
async function deleteBizUnit(request: DeleteBizUnitRequest): DeleteBizUnitResponse {
  var runtime = new $RuntimeOptions{};
  return deleteBizUnitWithOptions(request, runtime);
}

model DeleteDataDomainRequest {
  bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='6798087749072704'),
  id?: long(name='Id', description='This parameter is required.', example='1241844456'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteDataDomainResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model DeleteDataDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDataDomainResponseBody(name='body'),
}

/**
 * @summary 删除主题域。
 *
 * @param request DeleteDataDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDataDomainResponse
 */
async function deleteDataDomainWithOptions(request: DeleteDataDomainRequest, runtime: $RuntimeOptions): DeleteDataDomainResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.bizUnitId)) {
    query['BizUnitId'] = request.bizUnitId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteDataDomain',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除主题域。
 *
 * @param request DeleteDataDomainRequest
 * @return DeleteDataDomainResponse
 */
async function deleteDataDomain(request: DeleteDataDomainRequest): DeleteDataDomainResponse {
  var runtime = new $RuntimeOptions{};
  return deleteDataDomainWithOptions(request, runtime);
}

model DeleteDataSourceRequest {
  deleteCommand?: {
    mode?: string(name='Mode', description='This parameter is required.', example='DEV'),
    prodDataSourceId?: long(name='ProdDataSourceId', description='This parameter is required.', example='13121'),
  }(name='DeleteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteDataSourceShrinkRequest {
  deleteCommandShrink?: string(name='DeleteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteDataSourceResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model DeleteDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDataSourceResponseBody(name='body'),
}

/**
 * @summary 删除数据源
 *
 * @param tmpReq DeleteDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDataSourceResponse
 */
async function deleteDataSourceWithOptions(tmpReq: DeleteDataSourceRequest, runtime: $RuntimeOptions): DeleteDataSourceResponse {
  tmpReq.validate();
  var request = new DeleteDataSourceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.deleteCommand)) {
    request.deleteCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deleteCommand, 'DeleteCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.deleteCommandShrink)) {
    body['DeleteCommand'] = request.deleteCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteDataSource',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除数据源
 *
 * @param request DeleteDataSourceRequest
 * @return DeleteDataSourceResponse
 */
async function deleteDataSource(request: DeleteDataSourceRequest): DeleteDataSourceResponse {
  var runtime = new $RuntimeOptions{};
  return deleteDataSourceWithOptions(request, runtime);
}

model DeleteDirectoryRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12121111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='12132323'),
}

model DeleteDirectoryResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model DeleteDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDirectoryResponseBody(name='body'),
}

/**
 * @summary 删除菜单树文件目录
 *
 * @param request DeleteDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDirectoryResponse
 */
async function deleteDirectoryWithOptions(request: DeleteDirectoryRequest, runtime: $RuntimeOptions): DeleteDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteDirectory',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除菜单树文件目录
 *
 * @param request DeleteDirectoryRequest
 * @return DeleteDirectoryResponse
 */
async function deleteDirectory(request: DeleteDirectoryRequest): DeleteDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return deleteDirectoryWithOptions(request, runtime);
}

model DeleteRowPermissionRequest {
  deleteRowPermissionCommand?: {
    rowPermissionId?: long(name='RowPermissionId', description='This parameter is required.', example='300001234'),
  }(name='DeleteRowPermissionCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteRowPermissionShrinkRequest {
  deleteRowPermissionCommandShrink?: string(name='DeleteRowPermissionCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model DeleteRowPermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model DeleteRowPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRowPermissionResponseBody(name='body'),
}

/**
 * @summary 删除行级权限
 *
 * @param tmpReq DeleteRowPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRowPermissionResponse
 */
async function deleteRowPermissionWithOptions(tmpReq: DeleteRowPermissionRequest, runtime: $RuntimeOptions): DeleteRowPermissionResponse {
  tmpReq.validate();
  var request = new DeleteRowPermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.deleteRowPermissionCommand)) {
    request.deleteRowPermissionCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deleteRowPermissionCommand, 'DeleteRowPermissionCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.deleteRowPermissionCommandShrink)) {
    body['DeleteRowPermissionCommand'] = request.deleteRowPermissionCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteRowPermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除行级权限
 *
 * @param request DeleteRowPermissionRequest
 * @return DeleteRowPermissionResponse
 */
async function deleteRowPermission(request: DeleteRowPermissionRequest): DeleteRowPermissionResponse {
  var runtime = new $RuntimeOptions{};
  return deleteRowPermissionWithOptions(request, runtime);
}

model DeleteUserGroupRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='232131'),
}

model DeleteUserGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model DeleteUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserGroupResponseBody(name='body'),
}

/**
 * @summary 删除用户组.
 *
 * @param request DeleteUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserGroupResponse
 */
async function deleteUserGroupWithOptions(request: DeleteUserGroupRequest, runtime: $RuntimeOptions): DeleteUserGroupResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteUserGroup',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除用户组.
 *
 * @param request DeleteUserGroupRequest
 * @return DeleteUserGroupResponse
 */
async function deleteUserGroup(request: DeleteUserGroupRequest): DeleteUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return deleteUserGroupWithOptions(request, runtime);
}

model ExecuteAdHocTaskRequest {
  executeCommand?: {
    code?: string(name='Code', description='This parameter is required.', example='show tables;'),
    dataSourceCatalog?: string(name='DataSourceCatalog', example='mysql_catalog'),
    dataSourceId?: long(name='DataSourceId', example='12131111'),
    dataSourceSchema?: string(name='DataSourceSchema', example='erp'),
    operatorType?: string(name='OperatorType', description='This parameter is required.', example='MaxCompute_SQL'),
    paramList?: [ 
      {
        key?: string(name='Key', description='This parameter is required.', example='param1'),
        value?: string(name='Value', description='This parameter is required.', example='value1'),
      }
    ](name='ParamList'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='123222121'),
  }(name='ExecuteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ExecuteAdHocTaskShrinkRequest {
  executeCommandShrink?: string(name='ExecuteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ExecuteAdHocTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  executeResult?: {
    subTaskCount?: int32(name='SubTaskCount', example='1'),
    taskId?: string(name='TaskId', example='MaxCompute_SQL_300000843_1611548758327'),
  }(name='ExecuteResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ExecuteAdHocTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExecuteAdHocTaskResponseBody(name='body'),
}

/**
 * @summary 执行即席查询任务。
 *
 * @param tmpReq ExecuteAdHocTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExecuteAdHocTaskResponse
 */
async function executeAdHocTaskWithOptions(tmpReq: ExecuteAdHocTaskRequest, runtime: $RuntimeOptions): ExecuteAdHocTaskResponse {
  tmpReq.validate();
  var request = new ExecuteAdHocTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.executeCommand)) {
    request.executeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.executeCommand, 'ExecuteCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.executeCommandShrink)) {
    body['ExecuteCommand'] = request.executeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ExecuteAdHocTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 执行即席查询任务。
 *
 * @param request ExecuteAdHocTaskRequest
 * @return ExecuteAdHocTaskResponse
 */
async function executeAdHocTask(request: ExecuteAdHocTaskRequest): ExecuteAdHocTaskResponse {
  var runtime = new $RuntimeOptions{};
  return executeAdHocTaskWithOptions(request, runtime);
}

model ExecuteManualNodeRequest {
  env?: string(name='Env', example='PROD'),
  executeCommand?: {
    endBizDate?: string(name='EndBizDate', description='This parameter is required.', example='2024-05-07'),
    flowName?: string(name='FlowName', example='xx测试'),
    nodeId?: string(name='NodeId', description='This parameter is required.', example='n_12132'),
    paramList?: [ 
      {
        key?: string(name='Key', example='param1'),
        value?: string(name='Value', example='1'),
      }
    ](name='ParamList'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='123324'),
    startBizDate?: string(name='StartBizDate', description='This parameter is required.', example='2024-05-01'),
  }(name='ExecuteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ExecuteManualNodeShrinkRequest {
  env?: string(name='Env', example='PROD'),
  executeCommandShrink?: string(name='ExecuteCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ExecuteManualNodeResponseBody = {
  code?: string(name='Code', example='OK'),
  flowId?: string(name='FlowId', example='f_1231_121324'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ExecuteManualNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExecuteManualNodeResponseBody(name='body'),
}

/**
 * @summary 运行手动调度节点。
 *
 * @param tmpReq ExecuteManualNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExecuteManualNodeResponse
 */
async function executeManualNodeWithOptions(tmpReq: ExecuteManualNodeRequest, runtime: $RuntimeOptions): ExecuteManualNodeResponse {
  tmpReq.validate();
  var request = new ExecuteManualNodeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.executeCommand)) {
    request.executeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.executeCommand, 'ExecuteCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.executeCommandShrink)) {
    body['ExecuteCommand'] = request.executeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ExecuteManualNode',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 运行手动调度节点。
 *
 * @param request ExecuteManualNodeRequest
 * @return ExecuteManualNodeResponse
 */
async function executeManualNode(request: ExecuteManualNodeRequest): ExecuteManualNodeResponse {
  var runtime = new $RuntimeOptions{};
  return executeManualNodeWithOptions(request, runtime);
}

model FixDataRequest {
  env?: string(name='Env', example='PROD'),
  fixDataCommand?: {
    containRootInstance?: boolean(name='ContainRootInstance', example='false'),
    downStreamInstanceIdList?: [ 
      {
        fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
        id?: string(name='Id', example='t_2323421'),
      }
    ](name='DownStreamInstanceIdList'),
    downstreamRange?: string(name='DownstreamRange', example='ALL_INSTANCE'),
    forceRerun?: boolean(name='ForceRerun', example='false'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='132344'),
    rootInstanceId?: {
      fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
      id?: string(name='Id', description='This parameter is required.', example='t_2323111'),
    }(name='RootInstanceId', description='This parameter is required.'),
  }(name='FixDataCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model FixDataShrinkRequest {
  env?: string(name='Env', example='PROD'),
  fixDataCommandShrink?: string(name='FixDataCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model FixDataResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  submitId?: string(name='SubmitId', example='12324234'),
  success?: boolean(name='Success'),
}

model FixDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: FixDataResponseBody(name='body'),
}

/**
 * @summary 重跑下游(修复链路数据), 支持强制重跑下游。影响范围: 1. 会产生计算成本；2. 会影响数据产出
 *
 * @param tmpReq FixDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return FixDataResponse
 */
async function fixDataWithOptions(tmpReq: FixDataRequest, runtime: $RuntimeOptions): FixDataResponse {
  tmpReq.validate();
  var request = new FixDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.fixDataCommand)) {
    request.fixDataCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.fixDataCommand, 'FixDataCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.fixDataCommandShrink)) {
    body['FixDataCommand'] = request.fixDataCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'FixData',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 重跑下游(修复链路数据), 支持强制重跑下游。影响范围: 1. 会产生计算成本；2. 会影响数据产出
 *
 * @param request FixDataRequest
 * @return FixDataResponse
 */
async function fixData(request: FixDataRequest): FixDataResponse {
  var runtime = new $RuntimeOptions{};
  return fixDataWithOptions(request, runtime);
}

model GetAccountByRowPermissionIdRequest {
  getAccountByRowPermissionIdQuery?: {
    rowPermissionId?: long(name='RowPermissionId', description='This parameter is required.', example='300001234'),
    ruleIds?: [ long ](name='RuleIds', description='This parameter is required.'),
  }(name='GetAccountByRowPermissionIdQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetAccountByRowPermissionIdShrinkRequest {
  getAccountByRowPermissionIdQueryShrink?: string(name='GetAccountByRowPermissionIdQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetAccountByRowPermissionIdResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      id?: long(name='Id', example='300001235'),
      userMappingList?: [ 
        {
          accountType?: string(name='AccountType', example='PERSONAL'),
          accounts?: [ 
            {
              accountId?: string(name='AccountId', example='300901111'),
              accountName?: string(name='AccountName'),
            }
          ](name='Accounts'),
        }
      ](name='UserMappingList'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetAccountByRowPermissionIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAccountByRowPermissionIdResponseBody(name='body'),
}

/**
 * @summary 根据行级权限ID获取某一行级权限下的所有授权账号
 *
 * @param tmpReq GetAccountByRowPermissionIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAccountByRowPermissionIdResponse
 */
async function getAccountByRowPermissionIdWithOptions(tmpReq: GetAccountByRowPermissionIdRequest, runtime: $RuntimeOptions): GetAccountByRowPermissionIdResponse {
  tmpReq.validate();
  var request = new GetAccountByRowPermissionIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.getAccountByRowPermissionIdQuery)) {
    request.getAccountByRowPermissionIdQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.getAccountByRowPermissionIdQuery, 'GetAccountByRowPermissionIdQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.getAccountByRowPermissionIdQueryShrink)) {
    body['GetAccountByRowPermissionIdQuery'] = request.getAccountByRowPermissionIdQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetAccountByRowPermissionId',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据行级权限ID获取某一行级权限下的所有授权账号
 *
 * @param request GetAccountByRowPermissionIdRequest
 * @return GetAccountByRowPermissionIdResponse
 */
async function getAccountByRowPermissionId(request: GetAccountByRowPermissionIdRequest): GetAccountByRowPermissionIdResponse {
  var runtime = new $RuntimeOptions{};
  return getAccountByRowPermissionIdWithOptions(request, runtime);
}

model GetAdHocFileRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12121111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='12132323'),
}

model GetAdHocFileResponseBody = {
  code?: string(name='Code', example='OK'),
  fileInfo?: {
    content?: string(name='Content', example='select 1;'),
    creator?: string(name='Creator', example='12121'),
    directory?: string(name='Directory', example='/xx1/xx2/'),
    id?: long(name='Id', example='12121111'),
    lastModifier?: string(name='LastModifier', example='12121'),
    name?: string(name='Name', example='xx测试'),
    projectId?: long(name='ProjectId', example='12132323'),
  }(name='FileInfo'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetAdHocFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAdHocFileResponseBody(name='body'),
}

/**
 * @summary 查询即席查询文件。
 *
 * @param request GetAdHocFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAdHocFileResponse
 */
async function getAdHocFileWithOptions(request: GetAdHocFileRequest, runtime: $RuntimeOptions): GetAdHocFileResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetAdHocFile',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询即席查询文件。
 *
 * @param request GetAdHocFileRequest
 * @return GetAdHocFileResponse
 */
async function getAdHocFile(request: GetAdHocFileRequest): GetAdHocFileResponse {
  var runtime = new $RuntimeOptions{};
  return getAdHocFileWithOptions(request, runtime);
}

model GetAdHocTaskLogRequest {
  offset?: int32(name='Offset', description='This parameter is required.', example='1021'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  subTaskId?: int32(name='SubTaskId', description='This parameter is required.', example='0'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='MaxCompute_SQL_300000843_1611548758327'),
}

model GetAdHocTaskLogResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  logInfo?: {
    content?: string(name='Content', example='test'),
    hasNext?: boolean(name='HasNext'),
    hasResult?: boolean(name='HasResult'),
    nextOffset?: int32(name='NextOffset', example='2021'),
    subTaskId?: int32(name='SubTaskId', example='0'),
    taskId?: string(name='TaskId', example='MaxCompute_SQL_300000843_1611548758327'),
    taskStatus?: string(name='TaskStatus', example='WAIT_RESOURCE'),
  }(name='LogInfo'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetAdHocTaskLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAdHocTaskLogResponseBody(name='body'),
}

/**
 * @summary 获取即席查询任务运行日志。
 *
 * @param request GetAdHocTaskLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAdHocTaskLogResponse
 */
async function getAdHocTaskLogWithOptions(request: GetAdHocTaskLogRequest, runtime: $RuntimeOptions): GetAdHocTaskLogResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.offset)) {
    query['Offset'] = request.offset;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.subTaskId)) {
    query['SubTaskId'] = request.subTaskId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetAdHocTaskLog',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取即席查询任务运行日志。
 *
 * @param request GetAdHocTaskLogRequest
 * @return GetAdHocTaskLogResponse
 */
async function getAdHocTaskLog(request: GetAdHocTaskLogRequest): GetAdHocTaskLogResponse {
  var runtime = new $RuntimeOptions{};
  return getAdHocTaskLogWithOptions(request, runtime);
}

model GetAdHocTaskResultRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  subTaskId?: int32(name='SubTaskId', description='This parameter is required.', example='0'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='MaxCompute_SQL_300000843_1611548758327'),
}

model GetAdHocTaskResultResponseBody = {
  code?: string(name='Code', example='OK'),
  executeResult?: {
    result?: string(name='Result', example='1'),
    scheduleTaskId?: string(name='ScheduleTaskId', example='t_2242892326444990464_20210125_2242892326444990465'),
    taskId?: string(name='TaskId', example='MaxCompute_SQL_300000843_1611548758327'),
  }(name='ExecuteResult'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetAdHocTaskResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAdHocTaskResultResponseBody(name='body'),
}

/**
 * @summary 获取即席查询的任务运行结果。
 *
 * @param request GetAdHocTaskResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAdHocTaskResultResponse
 */
async function getAdHocTaskResultWithOptions(request: GetAdHocTaskResultRequest, runtime: $RuntimeOptions): GetAdHocTaskResultResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.subTaskId)) {
    query['SubTaskId'] = request.subTaskId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetAdHocTaskResult',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取即席查询的任务运行结果。
 *
 * @param request GetAdHocTaskResultRequest
 * @return GetAdHocTaskResultResponse
 */
async function getAdHocTaskResult(request: GetAdHocTaskResultRequest): GetAdHocTaskResultResponse {
  var runtime = new $RuntimeOptions{};
  return getAdHocTaskResultWithOptions(request, runtime);
}

model GetAlertEventRequest {
  id?: long(name='Id', description='This parameter is required.', example='12345'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetAlertEventResponseBody = {
  alertEventInfo?: {
    alertFrequency?: string(name='AlertFrequency', example='ONCE'),
    alertObject?: {
      name?: string(name='Name', example='test'),
      sourceSystemType?: string(name='SourceSystemType', example='ALL'),
      type?: string(name='Type', example='VDM_BATCH_PYTHON37'),
    }(name='AlertObject'),
    alertReason?: {
      alertReasonParamList?: [ 
        {
          key?: string(name='Key', example='biz_date'),
          value?: string(name='Value', example='2024-11-04 00:00:00'),
        }
      ](name='AlertReasonParamList'),
      bizDate?: string(name='BizDate', example='2024-11-05 16:19:32'),
      type?: string(name='Type', example='VDM_BATCH_FINISH'),
      uniqueKey?: string(name='UniqueKey', example='t_6340131422711644160_20241104_6340142'),
    }(name='AlertReason'),
    alertReceiverList?: [ 
      {
        alertChannelTypeList?: [ string ](name='AlertChannelTypeList'),
        customAlertChannelIdList?: [ string ](name='CustomAlertChannelIdList'),
        onCallTableName?: string(name='OnCallTableName', example='test'),
        type?: string(name='Type', example='OWNER'),
        userList?: [ 
          {
            name?: string(name='Name', example='Admin'),
          }
        ](name='UserList'),
      }
    ](name='AlertReceiverList'),
    belongProject?: {
      bizName?: string(name='BizName', example='biz_1'),
      projectName?: string(name='ProjectName', example='project_1'),
    }(name='BelongProject'),
    doNotDisturbEndTime?: string(name='DoNotDisturbEndTime', example='2024-11-05 00:00:00'),
    firstAlertTime?: string(name='FirstAlertTime', example='2024-11-05 16:19:33'),
    id?: long(name='Id', example='12345'),
    latestAlertTime?: string(name='LatestAlertTime', example='2024-11-05 16:19:33'),
    status?: string(name='Status', example='FINISH'),
    totalAlertTimes?: long(name='TotalAlertTimes', example='1'),
    urlConfig?: {
      alertConfigUrl?: string(name='AlertConfigUrl', example='https://dataphin.com/ops/test3'),
      logUrl?: string(name='LogUrl', example='https://dataphin.com/ops/test2'),
      objectUrl?: string(name='ObjectUrl', example='https://dataphin.com/ops/test1'),
    }(name='UrlConfig'),
  }(name='AlertEventInfo'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='True'),
}

model GetAlertEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAlertEventResponseBody(name='body'),
}

/**
 * @summary 获取告警事件详情
 *
 * @param request GetAlertEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAlertEventResponse
 */
async function getAlertEventWithOptions(request: GetAlertEventRequest, runtime: $RuntimeOptions): GetAlertEventResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetAlertEvent',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取告警事件详情
 *
 * @param request GetAlertEventRequest
 * @return GetAlertEventResponse
 */
async function getAlertEvent(request: GetAlertEventRequest): GetAlertEventResponse {
  var runtime = new $RuntimeOptions{};
  return getAlertEventWithOptions(request, runtime);
}

model GetBatchTaskInfoRequest {
  env?: string(name='Env', example='dev'),
  fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
  includeAllUpStreams?: boolean(name='IncludeAllUpStreams'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
}

model GetBatchTaskInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
  taskInfo?: {
    code?: string(name='Code', example='show tables;'),
    cronExpression?: string(name='CronExpression', example='0 0 1 * * ?'),
    customScheduleConfig?: {
      endTime?: string(name='EndTime', example='20:59'),
      interval?: int32(name='Interval', example='1'),
      intervalUnit?: string(name='IntervalUnit', example='HOUR'),
      schedulePeriod?: string(name='SchedulePeriod', example='DAILY'),
      startTime?: string(name='StartTime', example='08:00'),
    }(name='CustomScheduleConfig'),
    dagId?: string(name='DagId', example='dag_102121211'),
    dataSourceCatalog?: string(name='DataSourceCatalog', example='mysql_catalog'),
    dataSourceId?: string(name='DataSourceId', example='12131111'),
    dataSourceSchema?: string(name='DataSourceSchema', example='erp'),
    fileId?: long(name='FileId', example='12113111'),
    hasDevNode?: boolean(name='HasDevNode'),
    name?: string(name='Name', example='测试任务1'),
    needPublish?: boolean(name='NeedPublish'),
    nodeDescription?: string(name='NodeDescription', example='xx测试'),
    nodeFrom?: string(name='NodeFrom', example='openapi'),
    nodeId?: string(name='NodeId', example='n_1011_21232132322'),
    nodeName?: string(name='NodeName', example='测试任务1'),
    nodeOutputNameList?: [ string ](name='NodeOutputNameList'),
    nodeStatus?: int32(name='NodeStatus', example='1'),
    operatorUserId?: string(name='OperatorUserId', example='30231123'),
    ownerName?: string(name='OwnerName', example='张三'),
    ownerUserId?: string(name='OwnerUserId', example='30231123'),
    paramList?: [ 
      {
        key?: string(name='Key', example='key'),
        value?: string(name='Value', example='Value'),
      }
    ](name='ParamList'),
    paused?: boolean(name='Paused'),
    priority?: int32(name='Priority', example='1'),
    projectId?: long(name='ProjectId', example='131211211'),
    published?: boolean(name='Published'),
    remark?: string(name='Remark', example='test xx'),
    rerunable?: boolean(name='Rerunable'),
    schedulePeriod?: string(name='SchedulePeriod', example='DAILY'),
    scheduleType?: int32(name='ScheduleType', example='3'),
    sparkClientInfo?: {
      sparkClientVersion?: string(name='SparkClientVersion', example='abc'),
    }(name='SparkClientInfo'),
    status?: string(name='Status', example='测试任务1'),
    taskType?: int32(name='TaskType', example='21'),
    upStreamList?: [ 
      {
        dependPeriod?: {
          periodOffset?: int32(name='PeriodOffset', example='1'),
          periodType?: string(name='PeriodType', example='CURRENT_PERIOD'),
        }(name='DependPeriod'),
        dependStrategy?: string(name='DependStrategy', example='LAST'),
        fieldList?: [ string ](name='FieldList'),
        nodeType?: string(name='NodeType', example='PHYSICAL'),
        periodDiff?: int32(name='PeriodDiff', example='1'),
        sourceNodeEnabled?: boolean(name='SourceNodeEnabled'),
        sourceNodeId?: string(name='SourceNodeId', example='n_2001'),
        sourceNodeName?: string(name='SourceNodeName', example='t_input1'),
        sourceNodeOutputName?: string(name='SourceNodeOutputName', example='t_input1'),
        sourceNodeUserName?: string(name='SourceNodeUserName', example='张三'),
        sourceTableName?: string(name='SourceTableName', example='t_input1'),
      }
    ](name='UpStreamList'),
  }(name='TaskInfo'),
}

model GetBatchTaskInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBatchTaskInfoResponseBody(name='body'),
}

/**
 * @summary 获取离线计算任务详情。
 *
 * @param request GetBatchTaskInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBatchTaskInfoResponse
 */
async function getBatchTaskInfoWithOptions(request: GetBatchTaskInfoRequest, runtime: $RuntimeOptions): GetBatchTaskInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.includeAllUpStreams)) {
    query['IncludeAllUpStreams'] = request.includeAllUpStreams;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBatchTaskInfo',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取离线计算任务详情。
 *
 * @param request GetBatchTaskInfoRequest
 * @return GetBatchTaskInfoResponse
 */
async function getBatchTaskInfo(request: GetBatchTaskInfoRequest): GetBatchTaskInfoResponse {
  var runtime = new $RuntimeOptions{};
  return getBatchTaskInfoWithOptions(request, runtime);
}

model GetBatchTaskInfoByVersionRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  versionId?: long(name='VersionId', description='This parameter is required.', example='1'),
}

model GetBatchTaskInfoByVersionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
  taskInfo?: {
    code?: string(name='Code', example='show tables;'),
    cronExpression?: string(name='CronExpression', example='0 0 1 * * ?'),
    customScheduleConfig?: {
      endTime?: string(name='EndTime', example='20:59'),
      interval?: int32(name='Interval', example='1'),
      intervalUnit?: string(name='IntervalUnit', example='HOUR'),
      schedulePeriod?: string(name='SchedulePeriod', example='DAILY'),
      startTime?: string(name='StartTime', example='08:00'),
    }(name='CustomScheduleConfig'),
    dagId?: string(name='DagId', example='dag_102121211'),
    dataSourceCatalog?: string(name='DataSourceCatalog', example='mysql_catalog'),
    dataSourceId?: string(name='DataSourceId', example='12131111'),
    dataSourceSchema?: string(name='DataSourceSchema', example='erp'),
    fileId?: long(name='FileId', example='12113111'),
    hasDevNode?: boolean(name='HasDevNode'),
    name?: string(name='Name', example='测试任务1'),
    needPublish?: boolean(name='NeedPublish'),
    nodeDescription?: string(name='NodeDescription', example='xx测试'),
    nodeFrom?: string(name='NodeFrom', example='openapi'),
    nodeId?: string(name='NodeId', example='n_1011_21232132322'),
    nodeName?: string(name='NodeName', example='测试任务1'),
    nodeOutputNameList?: [ string ](name='NodeOutputNameList'),
    nodeStatus?: int32(name='NodeStatus', example='1'),
    operatorUserId?: string(name='OperatorUserId', example='30231123'),
    ownerName?: string(name='OwnerName', example='张三'),
    ownerUserId?: string(name='OwnerUserId', example='30231123'),
    paramList?: [ 
      {
        key?: string(name='Key', example='key'),
        value?: string(name='Value', example='Value'),
      }
    ](name='ParamList'),
    paused?: boolean(name='Paused'),
    priority?: int32(name='Priority', example='1'),
    projectId?: long(name='ProjectId', example='131211211'),
    published?: boolean(name='Published'),
    remark?: string(name='Remark', example='test xx'),
    rerunable?: boolean(name='Rerunable'),
    schedulePeriod?: string(name='SchedulePeriod', example='DAILY'),
    scheduleType?: int32(name='ScheduleType', example='3'),
    sparkClientInfo?: {
      sparkClientVersion?: string(name='SparkClientVersion', example='abc'),
    }(name='SparkClientInfo'),
    status?: string(name='Status', example='测试任务1'),
    taskType?: int32(name='TaskType', example='21'),
    upStreamList?: [ 
      {
        dependPeriod?: {
          periodOffset?: int32(name='PeriodOffset', example='1'),
          periodType?: string(name='PeriodType', example='CURRENT_PERIOD'),
        }(name='DependPeriod'),
        dependStrategy?: string(name='DependStrategy', example='LAST'),
        fieldList?: [ string ](name='FieldList'),
        nodeType?: string(name='NodeType', example='PHYSICAL'),
        periodDiff?: int32(name='PeriodDiff', example='1'),
        sourceNodeEnabled?: boolean(name='SourceNodeEnabled'),
        sourceNodeId?: string(name='SourceNodeId', example='n_2001'),
        sourceNodeName?: string(name='SourceNodeName', example='t_input1'),
        sourceNodeOutputName?: string(name='SourceNodeOutputName', example='t_input1'),
        sourceNodeUserName?: string(name='SourceNodeUserName', example='张三'),
        sourceTableName?: string(name='SourceTableName', example='t_input1'),
      }
    ](name='UpStreamList'),
  }(name='TaskInfo'),
}

model GetBatchTaskInfoByVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBatchTaskInfoByVersionResponseBody(name='body'),
}

/**
 * @summary 获取离线计算任务指定版本任务详情。
 *
 * @param request GetBatchTaskInfoByVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBatchTaskInfoByVersionResponse
 */
async function getBatchTaskInfoByVersionWithOptions(request: GetBatchTaskInfoByVersionRequest, runtime: $RuntimeOptions): GetBatchTaskInfoByVersionResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.versionId)) {
    query['VersionId'] = request.versionId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBatchTaskInfoByVersion',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取离线计算任务指定版本任务详情。
 *
 * @param request GetBatchTaskInfoByVersionRequest
 * @return GetBatchTaskInfoByVersionResponse
 */
async function getBatchTaskInfoByVersion(request: GetBatchTaskInfoByVersionRequest): GetBatchTaskInfoByVersionResponse {
  var runtime = new $RuntimeOptions{};
  return getBatchTaskInfoByVersionWithOptions(request, runtime);
}

model GetBatchTaskUdfLineagesRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
}

model GetBatchTaskUdfLineagesResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    lineageGroupList?: [ 
      {
        inputLineageList?: [ 
          {
            bizUnitId?: string(name='BizUnitId', example='103111231'),
            bizUnitName?: string(name='BizUnitName', example='xx测试'),
            columnList?: [ 
              {
                dataType?: string(name='DataType', example='varchar'),
                description?: string(name='Description', example='xx'),
                id?: string(name='Id', example='c011'),
                name?: string(name='Name', example='c011'),
                partitionKey?: boolean(name='PartitionKey'),
                primaryKey?: boolean(name='PrimaryKey'),
              }
            ](name='ColumnList'),
            description?: string(name='Description', example='test xx'),
            displayName?: string(name='DisplayName', example='t_input'),
            env?: string(name='Env', example='dev'),
            fullTable?: boolean(name='FullTable'),
            guid?: string(name='Guid', example='Guid_101121'),
            name?: string(name='Name', example='t_input'),
            ownerName?: string(name='OwnerName', example='张三'),
            ownerUserId?: string(name='OwnerUserId', example='20112101'),
            projectId?: string(name='ProjectId', example='131211211'),
            projectName?: string(name='ProjectName', example='prj_test'),
            subType?: string(name='SubType', example='dim'),
          }
        ](name='InputLineageList'),
        outputLineageList?: [ 
          {
            bizUnitId?: string(name='BizUnitId', example='103111231'),
            bizUnitName?: string(name='BizUnitName', example='xx测试'),
            columnList?: [ 
              {
                dataType?: string(name='DataType', example='varchar'),
                description?: string(name='Description', example='xx'),
                id?: string(name='Id', example='c011'),
                name?: string(name='Name', example='c011'),
                partitionKey?: boolean(name='PartitionKey'),
                primaryKey?: boolean(name='PrimaryKey'),
              }
            ](name='ColumnList'),
            description?: string(name='Description', example='test xx'),
            displayName?: string(name='DisplayName', example='t_input'),
            env?: string(name='Env', example='dev'),
            fullTable?: boolean(name='FullTable'),
            guid?: string(name='Guid', example='Guid_101121'),
            name?: string(name='Name', example='t_input'),
            ownerName?: string(name='OwnerName', example='张三'),
            ownerUserId?: string(name='OwnerUserId', example='20112101'),
            projectId?: string(name='ProjectId', example='131211211'),
            projectName?: string(name='ProjectName', example='prj_test'),
            subType?: string(name='SubType', example='dim'),
          }
        ](name='OutputLineageList'),
      }
    ](name='LineageGroupList'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetBatchTaskUdfLineagesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBatchTaskUdfLineagesResponseBody(name='body'),
}

/**
 * @summary 获取离线任务自定义血缘。
 *
 * @param request GetBatchTaskUdfLineagesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBatchTaskUdfLineagesResponse
 */
async function getBatchTaskUdfLineagesWithOptions(request: GetBatchTaskUdfLineagesRequest, runtime: $RuntimeOptions): GetBatchTaskUdfLineagesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBatchTaskUdfLineages',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取离线任务自定义血缘。
 *
 * @param request GetBatchTaskUdfLineagesRequest
 * @return GetBatchTaskUdfLineagesResponse
 */
async function getBatchTaskUdfLineages(request: GetBatchTaskUdfLineagesRequest): GetBatchTaskUdfLineagesResponse {
  var runtime = new $RuntimeOptions{};
  return getBatchTaskUdfLineagesWithOptions(request, runtime);
}

model GetBatchTaskVersionsRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
}

model GetBatchTaskVersionsResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    batchTaskVersionList?: [ 
      {
        comment?: string(name='Comment', example='test'),
        gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:10:10'),
        gmtModified?: string(name='GmtModified', example='2024-10-10 10:10:10'),
        nodeId?: string(name='NodeId', example='n_10231001'),
        projectId?: long(name='ProjectId', example='10232111011'),
        published?: boolean(name='Published'),
        userId?: string(name='UserId', example='20110110'),
        userName?: string(name='UserName', example='张三'),
        version?: string(name='Version', example='1'),
      }
    ](name='BatchTaskVersionList'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetBatchTaskVersionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBatchTaskVersionsResponseBody(name='body'),
}

/**
 * @summary 获取离线计算任务版本列表。
 *
 * @param request GetBatchTaskVersionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBatchTaskVersionsResponse
 */
async function getBatchTaskVersionsWithOptions(request: GetBatchTaskVersionsRequest, runtime: $RuntimeOptions): GetBatchTaskVersionsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBatchTaskVersions',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取离线计算任务版本列表。
 *
 * @param request GetBatchTaskVersionsRequest
 * @return GetBatchTaskVersionsResponse
 */
async function getBatchTaskVersions(request: GetBatchTaskVersionsRequest): GetBatchTaskVersionsResponse {
  var runtime = new $RuntimeOptions{};
  return getBatchTaskVersionsWithOptions(request, runtime);
}

model GetBizEntityInfoRequest {
  id?: long(name='Id', description='This parameter is required.', example='101001201'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
}

model GetBizEntityInfoResponseBody = {
  bizEntityInfo?: {
    bizObject?: {
      approvalId?: string(name='ApprovalId', example='221323121212'),
      approvalStatus?: string(name='ApprovalStatus', example='APPROVING'),
      childBizEntityIdList?: [ long ](name='ChildBizEntityIdList'),
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', example='create_object_name'),
      gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
      gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
      id?: long(name='Id', example='1011'),
      lastModifier?: string(name='LastModifier', example='30010010'),
      lastModifierName?: string(name='LastModifierName', example='张三'),
      name?: string(name='Name', example='create_object_code_name'),
      onlineStatus?: string(name='OnlineStatus', example='SUBMITTED'),
      ownerName?: string(name='OwnerName', example='张三'),
      ownerUserId?: string(name='OwnerUserId', example='30010010'),
      parentId?: long(name='ParentId', example='116306'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
      refDimTableCount?: int32(name='RefDimTableCount', example='1'),
      refSummaryTableCount?: int32(name='RefSummaryTableCount', example='1'),
      status?: string(name='Status', example='SUBMITTED'),
      type?: string(name='Type', example='NORMAL'),
    }(name='BizObject'),
    bizProcess?: {
      approvalId?: string(name='ApprovalId', example='221323121212'),
      approvalStatus?: string(name='ApprovalStatus', example='APPROVING'),
      bizEventEntityIdList?: [ long ](name='BizEventEntityIdList'),
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', example='业务活动测试'),
      gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
      gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
      hasDependent?: boolean(name='HasDependent'),
      id?: long(name='Id', example='1011'),
      lastModifier?: string(name='LastModifier', example='30010010'),
      lastModifierName?: string(name='LastModifierName', example='张三'),
      name?: string(name='Name', example='create_process_code_name'),
      onlineStatus?: string(name='OnlineStatus', example='SUBMITTED'),
      ownerName?: string(name='OwnerName', example='张三'),
      ownerUserId?: string(name='OwnerUserId', example='30010010'),
      preBizProcessIdList?: [ long ](name='PreBizProcessIdList'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
      refFactTableCount?: int32(name='RefFactTableCount', example='1'),
      status?: string(name='Status', example='SUBMITTED'),
      type?: string(name='Type', example='BIZ_EVENT'),
    }(name='BizProcess'),
    bizUnitId?: long(name='BizUnitId', example='6798087749072704'),
    dataDomainId?: long(name='DataDomainId', example='20101011'),
    type?: string(name='Type', example='BIZ_OBJECT'),
  }(name='BizEntityInfo'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetBizEntityInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBizEntityInfoResponseBody(name='body'),
}

/**
 * @summary 获取业务实体详情。
 *
 * @param request GetBizEntityInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBizEntityInfoResponse
 */
async function getBizEntityInfoWithOptions(request: GetBizEntityInfoRequest, runtime: $RuntimeOptions): GetBizEntityInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBizEntityInfo',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取业务实体详情。
 *
 * @param request GetBizEntityInfoRequest
 * @return GetBizEntityInfoResponse
 */
async function getBizEntityInfo(request: GetBizEntityInfoRequest): GetBizEntityInfoResponse {
  var runtime = new $RuntimeOptions{};
  return getBizEntityInfoWithOptions(request, runtime);
}

model GetBizEntityInfoByVersionRequest {
  id?: long(name='Id', description='This parameter is required.', example='101001201'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
  versionId?: long(name='VersionId', description='This parameter is required.', example='1'),
}

model GetBizEntityInfoByVersionResponseBody = {
  bizEntityInfo?: {
    bizObject?: {
      approvalId?: string(name='ApprovalId', example='221323121212'),
      approvalStatus?: string(name='ApprovalStatus', example='APPROVING'),
      childBizEntityIdList?: [ long ](name='ChildBizEntityIdList'),
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', example='create_object_name'),
      gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
      gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
      id?: long(name='Id', example='1011'),
      lastModifier?: string(name='LastModifier', example='30010010'),
      lastModifierName?: string(name='LastModifierName', example='张三'),
      name?: string(name='Name', example='create_object_code_name'),
      onlineStatus?: string(name='OnlineStatus', example='1'),
      ownerName?: string(name='OwnerName', example='张三'),
      ownerUserId?: string(name='OwnerUserId', example='30010010'),
      parentId?: long(name='ParentId', example='116306'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
      refDimTableCount?: int32(name='RefDimTableCount', example='1'),
      refSummaryTableCount?: int32(name='RefSummaryTableCount', example='1'),
      status?: string(name='Status', example='100'),
      type?: string(name='Type', example='NORMAL'),
    }(name='BizObject'),
    bizProcess?: {
      approvalId?: string(name='ApprovalId', example='221323121212'),
      approvalStatus?: string(name='ApprovalStatus', example='APPROVING'),
      bizEventEntityIdList?: [ long ](name='BizEventEntityIdList'),
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', example='业务活动测试'),
      gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
      gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
      hasDependent?: boolean(name='HasDependent'),
      id?: long(name='Id', example='1011'),
      lastModifier?: string(name='LastModifier', example='30010010'),
      lastModifierName?: string(name='LastModifierName', example='张三'),
      name?: string(name='Name', example='create_process_code_name'),
      onlineStatus?: string(name='OnlineStatus', example='1'),
      ownerName?: string(name='OwnerName', example='张三'),
      ownerUserId?: string(name='OwnerUserId', example='30010010'),
      preBizProcessIdList?: [ long ](name='PreBizProcessIdList'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
      refFactTableCount?: int32(name='RefFactTableCount', example='1'),
      status?: string(name='Status', example='100'),
      type?: string(name='Type', example='BIZ_EVENT'),
    }(name='BizProcess'),
    bizUnitId?: long(name='BizUnitId', example='6798087749072704'),
    dataDomainId?: long(name='DataDomainId', example='20101011'),
    type?: string(name='Type', example='BIZ_OBJECT'),
  }(name='BizEntityInfo'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetBizEntityInfoByVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBizEntityInfoByVersionResponseBody(name='body'),
}

/**
 * @summary 查询指定版本的业务实体的详情。
 *
 * @param request GetBizEntityInfoByVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBizEntityInfoByVersionResponse
 */
async function getBizEntityInfoByVersionWithOptions(request: GetBizEntityInfoByVersionRequest, runtime: $RuntimeOptions): GetBizEntityInfoByVersionResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  if (!$isNull(request.versionId)) {
    query['VersionId'] = request.versionId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBizEntityInfoByVersion',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询指定版本的业务实体的详情。
 *
 * @param request GetBizEntityInfoByVersionRequest
 * @return GetBizEntityInfoByVersionResponse
 */
async function getBizEntityInfoByVersion(request: GetBizEntityInfoByVersionRequest): GetBizEntityInfoByVersionResponse {
  var runtime = new $RuntimeOptions{};
  return getBizEntityInfoByVersionWithOptions(request, runtime);
}

model GetBizUnitInfoRequest {
  id?: long(name='Id', description='This parameter is required.', example='101001201'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetBizUnitInfoResponseBody = {
  bizUnitInfo?: {
    accountList?: [ 
      {
        id?: string(name='Id', example='20001201'),
      }
    ](name='AccountList'),
    bizObjectCount?: int32(name='BizObjectCount', example='1'),
    bizProcessCount?: int32(name='BizProcessCount', example='1'),
    businessLeaderList?: [ 
      {
        id?: string(name='Id', example='20001201'),
      }
    ](name='BusinessLeaderList'),
    dataDomainCount?: int32(name='DataDomainCount', example='1'),
    dataLeaderList?: [ 
      {
        id?: string(name='Id', example='20001201'),
      }
    ](name='DataLeaderList'),
    description?: string(name='Description', example='test'),
    displayName?: string(name='DisplayName', example='测试'),
    envList?: [ 
      {
        displayName?: string(name='DisplayName', example='测试数据板块001_开发'),
        envName?: string(name='EnvName', example='DEV'),
        name?: string(name='Name', example='LD_test001_dev'),
      }
    ](name='EnvList'),
    gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
    gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
    icon?: string(name='Icon', example='icon-e-commerce'),
    id?: long(name='Id', example='101001201'),
    lastModifier?: string(name='LastModifier', example='30010010'),
    lastModifierName?: string(name='LastModifierName', example='张三'),
    mode?: string(name='Mode', example='DEV_PROD'),
    name?: string(name='Name', example='test01'),
    ownerName?: string(name='OwnerName', example='张三'),
    ownerUserId?: string(name='OwnerUserId', example='30010010'),
  }(name='BizUnitInfo'),
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetBizUnitInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBizUnitInfoResponseBody(name='body'),
}

/**
 * @summary 获取数据板块详情。
 *
 * @param request GetBizUnitInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBizUnitInfoResponse
 */
async function getBizUnitInfoWithOptions(request: GetBizUnitInfoRequest, runtime: $RuntimeOptions): GetBizUnitInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetBizUnitInfo',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取数据板块详情。
 *
 * @param request GetBizUnitInfoRequest
 * @return GetBizUnitInfoResponse
 */
async function getBizUnitInfo(request: GetBizUnitInfoRequest): GetBizUnitInfoResponse {
  var runtime = new $RuntimeOptions{};
  return getBizUnitInfoWithOptions(request, runtime);
}

model GetClusterQueueInfoByEnvRequest {
  env?: string(name='Env', description='This parameter is required.', example='DEV'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='7081229106458752'),
  streamBatchMode?: string(name='StreamBatchMode', description='This parameter is required.', example='BOTH'),
}

model GetClusterQueueInfoByEnvResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      annotations?: string(name='Annotations', example='{  "creator": "new_datasource@test.aliyunid.com",  "modifier": "new_datasource@test.aliyunid.com" }'),
      clusterId?: string(name='ClusterId', example='61187014-a3ba-4cdd-8609-1f0aa3df4a3d'),
      createAt?: string(name='CreateAt', example='2024-10-31 10:29:17'),
      flinkImageRegistry?: string(name='FlinkImageRegistry', example='xxxx-registry-vpc.cn-shanghai.cr.aliyuncs.com/xxxx/flink:1.15.4-scala_2.12'),
      flinkImageRepository?: string(name='FlinkImageRepository', example='xxxx-registry-vpc.cn-shanghai.cr.aliyuncs.com'),
      flinkImageTag?: string(name='FlinkImageTag', example='1.15.4'),
      flinkVersion?: string(name='FlinkVersion', example='1.15'),
      labels?: string(name='Labels', example='cdh'),
      maxVcore?: string(name='MaxVcore', example='10'),
      modifiedAt?: string(name='ModifiedAt', example='2024-10-31 10:29:17'),
      namespace?: string(name='Namespace', example='dataphinv45prod'),
      queueName?: string(name='QueueName', example='default-queue'),
      resourceVersion?: string(name='ResourceVersion', example='1'),
      spec?: string(name='Spec', example='{\\\\n  \\\\"kind\\\\" : \\\\"kubernetes\\\\",\\\\n  \\\\"kubernetes\\\\{"namespace" : "n1730341728989z7",    "clusterName" : "a51578bdcce145"  },  "state" : "ONLINE"}'),
      vvpClusterType?: string(name='VvpClusterType', example='PREJOB'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetClusterQueueInfoByEnvResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterQueueInfoByEnvResponseBody(name='body'),
}

/**
 * @summary 根据环境获取集群信息
 *
 * @param request GetClusterQueueInfoByEnvRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterQueueInfoByEnvResponse
 */
async function getClusterQueueInfoByEnvWithOptions(request: GetClusterQueueInfoByEnvRequest, runtime: $RuntimeOptions): GetClusterQueueInfoByEnvResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.streamBatchMode)) {
    query['StreamBatchMode'] = request.streamBatchMode;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetClusterQueueInfoByEnv',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据环境获取集群信息
 *
 * @param request GetClusterQueueInfoByEnvRequest
 * @return GetClusterQueueInfoByEnvResponse
 */
async function getClusterQueueInfoByEnv(request: GetClusterQueueInfoByEnvRequest): GetClusterQueueInfoByEnvResponse {
  var runtime = new $RuntimeOptions{};
  return getClusterQueueInfoByEnvWithOptions(request, runtime);
}

model GetDataDomainInfoRequest {
  id?: long(name='Id', description='This parameter is required.', example='1241844456'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetDataDomainInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  dataDomainInfo?: {
    abbreviation?: string(name='Abbreviation', example='dm_code_name'),
    bizUnitId?: long(name='BizUnitId', example='545844456'),
    description?: string(name='Description', example='test'),
    displayName?: string(name='DisplayName', example='测试'),
    gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
    gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
    id?: long(name='Id', example='1241844456'),
    lastModifier?: string(name='LastModifier', example='30010010'),
    lastModifierName?: string(name='LastModifierName', example='张三'),
    name?: string(name='Name', example='dm_code_name'),
    ownerName?: string(name='OwnerName', example='张三'),
    ownerUserId?: string(name='OwnerUserId', example='30010010'),
    parentId?: long(name='ParentId', example='10232311'),
  }(name='DataDomainInfo'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetDataDomainInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDataDomainInfoResponseBody(name='body'),
}

/**
 * @summary 获取主题域详情。
 *
 * @param request GetDataDomainInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDataDomainInfoResponse
 */
async function getDataDomainInfoWithOptions(request: GetDataDomainInfoRequest, runtime: $RuntimeOptions): GetDataDomainInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetDataDomainInfo',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取主题域详情。
 *
 * @param request GetDataDomainInfoRequest
 * @return GetDataDomainInfoResponse
 */
async function getDataDomainInfo(request: GetDataDomainInfoRequest): GetDataDomainInfoResponse {
  var runtime = new $RuntimeOptions{};
  return getDataDomainInfoWithOptions(request, runtime);
}

model GetDevObjectDependencyRequest {
  objectFrom?: string(name='ObjectFrom', description='This parameter is required.', example='DATA_PROCESS'),
  objectId?: string(name='ObjectId', description='This parameter is required.', example='7026498387616064'),
  objectType?: string(name='ObjectType', description='This parameter is required.', example='7026498387616064'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='7021037162911616L'),
}

model GetDevObjectDependencyResponseBody = {
  code?: string(name='Code', example='OK'),
  devObjectDependencyList?: [ 
    {
      autoParse?: boolean(name='AutoParse', example='true'),
      bizType?: string(name='BizType', example='SCRIPT'),
      bizUnitId?: string(name='BizUnitId', example='13111'),
      bizUnitName?: string(name='BizUnitName'),
      cronExpression?: string(name='CronExpression', example='0 0 0 * * ?'),
      customCronExpression?: boolean(name='CustomCronExpression', example='true'),
      dependFieldList?: [ string ](name='DependFieldList'),
      dependencyPeriod?: {
        periodOffset?: int32(name='PeriodOffset', example='1'),
        periodType?: string(name='PeriodType', example='CURRENT_PERIOD'),
      }(name='DependencyPeriod'),
      dependencyStrategy?: string(name='DependencyStrategy', example='ALL'),
      dimMidNode?: boolean(name='DimMidNode', example='true'),
      effectFieldList?: [ string ](name='EffectFieldList'),
      externalBizInfo?: string(name='ExternalBizInfo'),
      manuallyAdd?: boolean(name='ManuallyAdd', example='false'),
      nodeId?: string(name='NodeId', example='n_13211'),
      nodeName?: string(name='NodeName'),
      nodeOutputName?: string(name='NodeOutputName', example='n_xx'),
      nodeOutputTableName?: string(name='NodeOutputTableName', example='t_xx'),
      nodeType?: string(name='NodeType', example='DATA_PROCESS'),
      outputContextParamList?: [ 
        {
          defaultValue?: string(name='DefaultValue', example='v1'),
          description?: string(name='Description', example='xxtest'),
          key?: string(name='Key', example='v1'),
        }
      ](name='OutputContextParamList'),
      ownerList?: [ 
        {
          id?: string(name='Id', example='11123'),
          name?: string(name='Name'),
        }
      ](name='OwnerList'),
      periodDiff?: int32(name='PeriodDiff', example='1'),
      projectId?: long(name='ProjectId', example='123131'),
      projectName?: string(name='ProjectName'),
      scheduleType?: string(name='ScheduleType', example='DAILY'),
      selfDepend?: boolean(name='SelfDepend', example='true'),
      subBizType?: string(name='SubBizType', example='SHELL'),
      valid?: boolean(name='Valid', example='true'),
    }
  ](name='DevObjectDependencyList'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetDevObjectDependencyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDevObjectDependencyResponseBody(name='body'),
}

/**
 * @summary 查询开发态对象上游依赖。
 *
 * @param request GetDevObjectDependencyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDevObjectDependencyResponse
 */
async function getDevObjectDependencyWithOptions(request: GetDevObjectDependencyRequest, runtime: $RuntimeOptions): GetDevObjectDependencyResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.objectFrom)) {
    query['ObjectFrom'] = request.objectFrom;
  }
  if (!$isNull(request.objectId)) {
    query['ObjectId'] = request.objectId;
  }
  if (!$isNull(request.objectType)) {
    query['ObjectType'] = request.objectType;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetDevObjectDependency',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询开发态对象上游依赖。
 *
 * @param request GetDevObjectDependencyRequest
 * @return GetDevObjectDependencyResponse
 */
async function getDevObjectDependency(request: GetDevObjectDependencyRequest): GetDevObjectDependencyResponse {
  var runtime = new $RuntimeOptions{};
  return getDevObjectDependencyWithOptions(request, runtime);
}

model GetDirectoryTreeRequest {
  category?: string(name='Category', description='This parameter is required.', example='codeManage'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='7081229106458752'),
}

model GetDirectoryTreeResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      children?: {
        categoryType?: string(name='CategoryType', example='codeManage'),
        creator?: string(name='Creator', example='300000907'),
        creatorName?: string(name='CreatorName', example='John'),
        dataCellId?: long(name='DataCellId', example='41342'),
        dirName?: string(name='DirName', example='/'),
        gmtCreate?: string(name='GmtCreate', example='2024-11-01 18:08:17'),
        gmtModified?: string(name='GmtModified', example='2024-11-01 18:08:17'),
        id?: long(name='Id', example='3'),
        lastModifier?: string(name='LastModifier', example='300000907'),
        lastModifierName?: string(name='LastModifierName', example='John'),
        name?: string(name='Name', example='代码管理'),
        projectId?: long(name='ProjectId', example='7081229106458752'),
        stringId?: string(name='StringId', example='3'),
        type?: string(name='Type', example='codeManage'),
      }(name='Children'),
      parent?: {
        categoryType?: string(name='CategoryType', example='codeManage'),
        creator?: string(name='Creator', example='300000907'),
        creatorName?: string(name='CreatorName', example='John'),
        dataCellId?: long(name='DataCellId', example='3213'),
        dirName?: string(name='DirName', example='/'),
        gmtCreate?: string(name='GmtCreate', example='2024-11-01 18:08:17'),
        gmtModified?: string(name='GmtModified', example='2024-11-01 18:08:17'),
        id?: long(name='Id', example='3'),
        lastModifier?: string(name='LastModifier', example='300000907'),
        lastModifierName?: string(name='LastModifierName', example='John'),
        name?: string(name='Name', example='代码管理'),
        projectId?: long(name='ProjectId', example='7081229106458752'),
        stringId?: string(name='StringId', example='3'),
        type?: string(name='Type', example='codeManage'),
      }(name='Parent'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetDirectoryTreeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDirectoryTreeResponseBody(name='body'),
}

/**
 * @summary 获取文件夹目录树
 *
 * @param request GetDirectoryTreeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDirectoryTreeResponse
 */
async function getDirectoryTreeWithOptions(request: GetDirectoryTreeRequest, runtime: $RuntimeOptions): GetDirectoryTreeResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.category)) {
    query['Category'] = request.category;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetDirectoryTree',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取文件夹目录树
 *
 * @param request GetDirectoryTreeRequest
 * @return GetDirectoryTreeResponse
 */
async function getDirectoryTree(request: GetDirectoryTreeRequest): GetDirectoryTreeResponse {
  var runtime = new $RuntimeOptions{};
  return getDirectoryTreeWithOptions(request, runtime);
}

model GetInstanceDownStreamRequest {
  downStreamDepth?: int32(name='DownStreamDepth', description='This parameter is required.', example='1'),
  env?: string(name='Env', example='PROD'),
  instanceGet?: {
    instanceId?: string(name='InstanceId', description='This parameter is required.', example='t_5929472_20210411_9577721'),
    nodeType?: string(name='NodeType', description='This parameter is required.', example='DATA_PROCESS'),
  }(name='InstanceGet', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  runStatus?: string(name='RunStatus', example='SUCCESS'),
}

model GetInstanceDownStreamShrinkRequest {
  downStreamDepth?: int32(name='DownStreamDepth', description='This parameter is required.', example='1'),
  env?: string(name='Env', example='PROD'),
  instanceGetShrink?: string(name='InstanceGet', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  runStatus?: string(name='RunStatus', example='SUCCESS'),
}

model GetInstanceDownStreamResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceRelationList?: [ 
    {
      downStreamDepth?: int32(name='DownStreamDepth', example='1'),
      extendInfo?: string(name='ExtendInfo', example='{"a":"x"}'),
      fieldInstanceList?: [ 
        {
          fieldInstanceId?: string(name='FieldInstanceId', example='t_23211'),
          runStatus?: string(name='RunStatus', example='SUCCESS'),
          selectStatus?: string(name='SelectStatus', example='OPTIONAL'),
        }
      ](name='FieldInstanceList'),
      instanceInfo?: {
        id?: string(name='Id', example='t_232411'),
        name?: string(name='Name'),
        type?: string(name='Type', example='DATA_PROCESS'),
      }(name='InstanceInfo'),
      runStatus?: string(name='RunStatus', example='RUNNING'),
      selectStatus?: string(name='SelectStatus', example='OPTIONAL'),
      selectStatusCause?: string(name='SelectStatusCause', example='FIELD_DELETED'),
    }
  ](name='InstanceRelationList'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetInstanceDownStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetInstanceDownStreamResponseBody(name='body'),
}

/**
 * @summary 根据起始的实例查询该实例的下游
 *
 * @param tmpReq GetInstanceDownStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetInstanceDownStreamResponse
 */
async function getInstanceDownStreamWithOptions(tmpReq: GetInstanceDownStreamRequest, runtime: $RuntimeOptions): GetInstanceDownStreamResponse {
  tmpReq.validate();
  var request = new GetInstanceDownStreamShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.instanceGet)) {
    request.instanceGetShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceGet, 'InstanceGet', 'json');
  }
  var query = {};
  if (!$isNull(request.downStreamDepth)) {
    query['DownStreamDepth'] = request.downStreamDepth;
  }
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.runStatus)) {
    query['RunStatus'] = request.runStatus;
  }
  var body : map[string]any = {};
  if (!$isNull(request.instanceGetShrink)) {
    body['InstanceGet'] = request.instanceGetShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetInstanceDownStream',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据起始的实例查询该实例的下游
 *
 * @param request GetInstanceDownStreamRequest
 * @return GetInstanceDownStreamResponse
 */
async function getInstanceDownStream(request: GetInstanceDownStreamRequest): GetInstanceDownStreamResponse {
  var runtime = new $RuntimeOptions{};
  return getInstanceDownStreamWithOptions(request, runtime);
}

model GetInstanceUpDownStreamRequest {
  downStreamDepth?: int32(name='DownStreamDepth', example='1'),
  env?: string(name='Env', example='PROD'),
  instanceId?: {
    fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
    id?: string(name='Id', description='This parameter is required.', example='t_123456'),
  }(name='InstanceId', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='1001121'),
  upStreamDepth?: int32(name='UpStreamDepth', example='1'),
}

model GetInstanceUpDownStreamShrinkRequest {
  downStreamDepth?: int32(name='DownStreamDepth', example='1'),
  env?: string(name='Env', example='PROD'),
  instanceIdShrink?: string(name='InstanceId', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='1001121'),
  upStreamDepth?: int32(name='UpStreamDepth', example='1'),
}

model GetInstanceUpDownStreamResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceDagInfo?: {
    downInstanceList?: [ 
      {
        fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
        id?: string(name='Id', example='t_1234567'),
        name?: string(name='Name', example='xx测试'),
        nodeId?: string(name='NodeId', example='n_1234567'),
        nodeType?: string(name='NodeType', example='DATA_PROCESS'),
      }
    ](name='DownInstanceList'),
    startInstanceList?: [ 
      {
        fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
        id?: string(name='Id', example='t_1234567'),
        name?: string(name='Name', example='xx测试'),
        nodeId?: string(name='NodeId', example='n_1234567'),
        nodeType?: string(name='NodeType', example='DATA_PROCESS'),
      }
    ](name='StartInstanceList'),
    upInstanceList?: [ 
      {
        fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
        id?: string(name='Id', example='t_1234567'),
        name?: string(name='Name', example='xx测试'),
        nodeId?: string(name='NodeId', example='n_1234567'),
        nodeType?: string(name='NodeType', example='DATA_PROCESS'),
      }
    ](name='UpInstanceList'),
  }(name='InstanceDagInfo'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetInstanceUpDownStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetInstanceUpDownStreamResponseBody(name='body'),
}

/**
 * @summary 查询实例的上下游，支持逻辑表和代码任务。
 *
 * @param tmpReq GetInstanceUpDownStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetInstanceUpDownStreamResponse
 */
async function getInstanceUpDownStreamWithOptions(tmpReq: GetInstanceUpDownStreamRequest, runtime: $RuntimeOptions): GetInstanceUpDownStreamResponse {
  tmpReq.validate();
  var request = new GetInstanceUpDownStreamShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.instanceId)) {
    request.instanceIdShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceId, 'InstanceId', 'json');
  }
  var query = {};
  if (!$isNull(request.downStreamDepth)) {
    query['DownStreamDepth'] = request.downStreamDepth;
  }
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.upStreamDepth)) {
    query['UpStreamDepth'] = request.upStreamDepth;
  }
  var body : map[string]any = {};
  if (!$isNull(request.instanceIdShrink)) {
    body['InstanceId'] = request.instanceIdShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetInstanceUpDownStream',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询实例的上下游，支持逻辑表和代码任务。
 *
 * @param request GetInstanceUpDownStreamRequest
 * @return GetInstanceUpDownStreamResponse
 */
async function getInstanceUpDownStream(request: GetInstanceUpDownStreamRequest): GetInstanceUpDownStreamResponse {
  var runtime = new $RuntimeOptions{};
  return getInstanceUpDownStreamWithOptions(request, runtime);
}

model GetLatestSubmitDetailRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  submitDetailQuery?: {
    objectId?: string(name='ObjectId', description='This parameter is required.', example='12345'),
    objectType?: string(name='ObjectType', description='This parameter is required.', example='MAX_COMPUTE_SQL'),
  }(name='SubmitDetailQuery', description='This parameter is required.'),
}

model GetLatestSubmitDetailShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  submitDetailQueryShrink?: string(name='SubmitDetailQuery', description='This parameter is required.'),
}

model GetLatestSubmitDetailResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  submitDetailResult?: {
    id?: long(name='Id', example='1234'),
    publishStatus?: string(name='PublishStatus', example='SUCCESS'),
    releaseObject?: {
      changeType?: string(name='ChangeType', example='DELETE'),
      nodeId?: string(name='NodeId', example='n_1234'),
      objectVersion?: string(name='ObjectVersion', example='1'),
      projectId?: long(name='ProjectId', example='1234'),
      submitComment?: string(name='SubmitComment', example='提交说明'),
      submitObject?: {
        objectId?: string(name='ObjectId', example='1234'),
        objectName?: string(name='ObjectName', example='abc'),
        objectType?: string(name='ObjectType', example='MAX_COMPUTE_SQL'),
      }(name='SubmitObject'),
    }(name='ReleaseObject'),
    submitStatus?: string(name='SubmitStatus', example='TO_BE_PUBLISHED'),
    tag?: string(name='Tag', example='tag'),
  }(name='SubmitDetailResult'),
  success?: boolean(name='Success'),
}

model GetLatestSubmitDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetLatestSubmitDetailResponseBody(name='body'),
}

/**
 * @summary 获取最新的待发布记录详情
 *
 * @param tmpReq GetLatestSubmitDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetLatestSubmitDetailResponse
 */
async function getLatestSubmitDetailWithOptions(tmpReq: GetLatestSubmitDetailRequest, runtime: $RuntimeOptions): GetLatestSubmitDetailResponse {
  tmpReq.validate();
  var request = new GetLatestSubmitDetailShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.submitDetailQuery)) {
    request.submitDetailQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.submitDetailQuery, 'SubmitDetailQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.submitDetailQueryShrink)) {
    body['SubmitDetailQuery'] = request.submitDetailQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetLatestSubmitDetail',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取最新的待发布记录详情
 *
 * @param request GetLatestSubmitDetailRequest
 * @return GetLatestSubmitDetailResponse
 */
async function getLatestSubmitDetail(request: GetLatestSubmitDetailRequest): GetLatestSubmitDetailResponse {
  var runtime = new $RuntimeOptions{};
  return getLatestSubmitDetailWithOptions(request, runtime);
}

model GetMyRolesRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetMyRolesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  roleList?: [ 
    {
      description?: string(name='Description'),
      id?: long(name='Id', example='300047957'),
      name?: string(name='Name', example='dataphinAdmin'),
    }
  ](name='RoleList'),
  success?: boolean(name='Success', example='true'),
}

model GetMyRolesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMyRolesResponseBody(name='body'),
}

/**
 * @summary 获取用户角色列表
 *
 * @param request GetMyRolesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMyRolesResponse
 */
async function getMyRolesWithOptions(request: GetMyRolesRequest, runtime: $RuntimeOptions): GetMyRolesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetMyRoles',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户角色列表
 *
 * @param request GetMyRolesRequest
 * @return GetMyRolesResponse
 */
async function getMyRoles(request: GetMyRolesRequest): GetMyRolesResponse {
  var runtime = new $RuntimeOptions{};
  return getMyRolesWithOptions(request, runtime);
}

model GetMyTenantsRequest {
  featureCodeList?: [ string ](name='FeatureCodeList'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetMyTenantsShrinkRequest {
  featureCodeListShrink?: string(name='FeatureCodeList'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetMyTenantsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  tenantList?: [ 
    {
      deleteTime?: long(name='DeleteTime', example='1717343597000'),
      deleted?: boolean(name='Deleted', example='false'),
      description?: string(name='Description'),
      id?: long(name='Id', example='132311'),
      name?: string(name='Name'),
      opsTenant?: boolean(name='OpsTenant', example='false'),
      ownerId?: string(name='OwnerId', example='21323231'),
      resourceLimited?: boolean(name='ResourceLimited', example='false'),
      tenantTypeList?: [ string ](name='TenantTypeList'),
      titleType?: string(name='TitleType', example='icon'),
      visible?: boolean(name='Visible', example='true'),
    }
  ](name='TenantList'),
}

model GetMyTenantsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMyTenantsResponseBody(name='body'),
}

/**
 * @summary 获取当前用户归属租户.
 *
 * @param tmpReq GetMyTenantsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMyTenantsResponse
 */
async function getMyTenantsWithOptions(tmpReq: GetMyTenantsRequest, runtime: $RuntimeOptions): GetMyTenantsResponse {
  tmpReq.validate();
  var request = new GetMyTenantsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.featureCodeList)) {
    request.featureCodeListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.featureCodeList, 'FeatureCodeList', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.featureCodeListShrink)) {
    body['FeatureCodeList'] = request.featureCodeListShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetMyTenants',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取当前用户归属租户.
 *
 * @param request GetMyTenantsRequest
 * @return GetMyTenantsResponse
 */
async function getMyTenants(request: GetMyTenantsRequest): GetMyTenantsResponse {
  var runtime = new $RuntimeOptions{};
  return getMyTenantsWithOptions(request, runtime);
}

model GetNodeUpDownStreamRequest {
  downStreamDepth?: int32(name='DownStreamDepth', example='1'),
  env?: string(name='Env', example='DEV'),
  nodeId?: {
    fieldIdList?: string(name='FieldIdList', example='12'),
    id?: string(name='Id', description='This parameter is required.', example='11313'),
  }(name='NodeId', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', example='113123'),
  upStreamDepth?: int32(name='UpStreamDepth', example='1'),
}

model GetNodeUpDownStreamShrinkRequest {
  downStreamDepth?: int32(name='DownStreamDepth', example='1'),
  env?: string(name='Env', example='DEV'),
  nodeIdShrink?: string(name='NodeId', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', example='113123'),
  upStreamDepth?: int32(name='UpStreamDepth', example='1'),
}

model GetNodeUpDownStreamResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  nodeDagInfo?: {
    downStreamNodeList?: [ 
      {
        fieldIdList?: [ string ](name='FieldIdList'),
        id?: string(name='Id', example='n_123456'),
        name?: string(name='Name', example='xx测试'),
        type?: string(name='Type', example='DATA_PROCESS'),
      }
    ](name='DownStreamNodeList'),
    startNodeList?: [ 
      {
        fieldIdList?: [ string ](name='FieldIdList'),
        id?: string(name='Id', example='n_123456'),
        name?: string(name='Name', example='xx测试'),
        type?: string(name='Type', example='DATA_PROCESS'),
      }
    ](name='StartNodeList'),
    upStreamNodeList?: [ 
      {
        fieldIdList?: [ string ](name='FieldIdList'),
        id?: string(name='Id', example='n_123456'),
        name?: string(name='Name', example='xx测试'),
        type?: string(name='Type', example='DATA_PROCESS'),
      }
    ](name='UpStreamNodeList'),
  }(name='NodeDagInfo'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetNodeUpDownStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNodeUpDownStreamResponseBody(name='body'),
}

/**
 * @summary 通用查询节点上下游接口
 *
 * @param tmpReq GetNodeUpDownStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNodeUpDownStreamResponse
 */
async function getNodeUpDownStreamWithOptions(tmpReq: GetNodeUpDownStreamRequest, runtime: $RuntimeOptions): GetNodeUpDownStreamResponse {
  tmpReq.validate();
  var request = new GetNodeUpDownStreamShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.nodeId)) {
    request.nodeIdShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.nodeId, 'NodeId', 'json');
  }
  var query = {};
  if (!$isNull(request.downStreamDepth)) {
    query['DownStreamDepth'] = request.downStreamDepth;
  }
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.upStreamDepth)) {
    query['UpStreamDepth'] = request.upStreamDepth;
  }
  var body : map[string]any = {};
  if (!$isNull(request.nodeIdShrink)) {
    body['NodeId'] = request.nodeIdShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetNodeUpDownStream',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通用查询节点上下游接口
 *
 * @param request GetNodeUpDownStreamRequest
 * @return GetNodeUpDownStreamResponse
 */
async function getNodeUpDownStream(request: GetNodeUpDownStreamRequest): GetNodeUpDownStreamResponse {
  var runtime = new $RuntimeOptions{};
  return getNodeUpDownStreamWithOptions(request, runtime);
}

model GetOperationSubmitStatusRequest {
  env?: string(name='Env', example='PROD'),
  jobId?: string(name='JobId', description='This parameter is required.', example='1324444131'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetOperationSubmitStatusResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  operationSubmitJob?: {
    externalBizId?: string(name='ExternalBizId', example='f_122_232342'),
    jobId?: string(name='JobId', example='123456'),
    operation?: string(name='Operation', example='SUPPLY_DATA'),
    operationStatus?: string(name='OperationStatus', example='SUCCESS'),
    operator?: string(name='Operator', example='132344'),
    progress?: string(name='Progress', example='80'),
  }(name='OperationSubmitJob'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetOperationSubmitStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOperationSubmitStatusResponseBody(name='body'),
}

/**
 * @summary 查询补数据提交的状态
 *
 * @param request GetOperationSubmitStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOperationSubmitStatusResponse
 */
async function getOperationSubmitStatusWithOptions(request: GetOperationSubmitStatusRequest, runtime: $RuntimeOptions): GetOperationSubmitStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.jobId)) {
    query['JobId'] = request.jobId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetOperationSubmitStatus',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询补数据提交的状态
 *
 * @param request GetOperationSubmitStatusRequest
 * @return GetOperationSubmitStatusResponse
 */
async function getOperationSubmitStatus(request: GetOperationSubmitStatusRequest): GetOperationSubmitStatusResponse {
  var runtime = new $RuntimeOptions{};
  return getOperationSubmitStatusWithOptions(request, runtime);
}

model GetPhysicalInstanceRequest {
  env?: string(name='Env', example='PROD'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='t_23231'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='2323131'),
}

model GetPhysicalInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instance?: {
    bizDate?: string(name='BizDate', example='2023-06-25'),
    dueTime?: string(name='DueTime', example='2023-06-27 00:30:00'),
    duration?: string(name='Duration', example='3600s'),
    endExecuteTime?: long(name='EndExecuteTime', example='2023-06-27 02:30:00'),
    extendInfo?: string(name='ExtendInfo', example='xx'),
    id?: string(name='Id', example='t_23231'),
    index?: int32(name='Index', example='1'),
    nodeInfo?: {
      bizUnitName?: string(name='BizUnitName', example='xx'),
      createTime?: string(name='CreateTime', example='2023-02-02 23:53:17'),
      creator?: {
        id?: string(name='Id', example='2323111'),
        name?: string(name='Name', example='zhangsan'),
      }(name='Creator'),
      description?: string(name='Description'),
      dryRun?: boolean(name='DryRun', example='false'),
      from?: string(name='From', example='DATA_PROCESS'),
      hasDev?: boolean(name='HasDev', example='true'),
      hasProd?: boolean(name='HasProd', example='true'),
      id?: string(name='Id', example='n_3232312'),
      lastModifiedTime?: string(name='LastModifiedTime', example='2024-02-02 23:53:17'),
      modifier?: {
        id?: string(name='Id', example='2323111'),
        name?: string(name='Name', example='zhangsan'),
      }(name='Modifier'),
      name?: string(name='Name'),
      ownerList?: [ 
        {
          id?: string(name='Id', example='2323111'),
          name?: string(name='Name', example='zhangsan'),
        }
      ](name='OwnerList'),
      priorityList?: [ string ](name='PriorityList'),
      resourceGroupList?: [ string ](name='ResourceGroupList'),
      schedulePaused?: boolean(name='SchedulePaused', example='false'),
      schedulePeriodList?: [ string ](name='SchedulePeriodList'),
      subDetailType?: string(name='SubDetailType', example='SHELL'),
      type?: string(name='Type', example='DATA_PROCESS'),
    }(name='NodeInfo'),
    startExecuteTime?: long(name='StartExecuteTime', example='2023-06-27 01:30:00'),
    statusList?: [ string ](name='StatusList'),
  }(name='Instance'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetPhysicalInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPhysicalInstanceResponseBody(name='body'),
}

/**
 * @summary 查询脚本的实例信息, 包括实例状态、运行时间等信息.
 *
 * @param request GetPhysicalInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPhysicalInstanceResponse
 */
async function getPhysicalInstanceWithOptions(request: GetPhysicalInstanceRequest, runtime: $RuntimeOptions): GetPhysicalInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPhysicalInstance',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询脚本的实例信息, 包括实例状态、运行时间等信息.
 *
 * @param request GetPhysicalInstanceRequest
 * @return GetPhysicalInstanceResponse
 */
async function getPhysicalInstance(request: GetPhysicalInstanceRequest): GetPhysicalInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return getPhysicalInstanceWithOptions(request, runtime);
}

model GetPhysicalInstanceLogRequest {
  env?: string(name='Env', example='PROD'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='t_5929472_20210411_9577721'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='123131'),
}

model GetPhysicalInstanceLogResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  taskrunLogList?: [ 
    {
      duration?: string(name='Duration', example='60s'),
      endTime?: string(name='EndTime', example='2024-05-30 16:48:13'),
      logContent?: string(name='LogContent', example='xx'),
      startTime?: string(name='StartTime', example='2024-05-30 16:47:13'),
      status?: string(name='Status', example='SUCCESS'),
      taskrunId?: string(name='TaskrunId', example='tr_23231'),
    }
  ](name='TaskrunLogList'),
}

model GetPhysicalInstanceLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPhysicalInstanceLogResponseBody(name='body'),
}

/**
 * @summary 获取实例执行的日志，如果实例重跑了多次，则会有多条日志
 *
 * @param request GetPhysicalInstanceLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPhysicalInstanceLogResponse
 */
async function getPhysicalInstanceLogWithOptions(request: GetPhysicalInstanceLogRequest, runtime: $RuntimeOptions): GetPhysicalInstanceLogResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPhysicalInstanceLog',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取实例执行的日志，如果实例重跑了多次，则会有多条日志
 *
 * @param request GetPhysicalInstanceLogRequest
 * @return GetPhysicalInstanceLogResponse
 */
async function getPhysicalInstanceLog(request: GetPhysicalInstanceLogRequest): GetPhysicalInstanceLogResponse {
  var runtime = new $RuntimeOptions{};
  return getPhysicalInstanceLogWithOptions(request, runtime);
}

model GetPhysicalNodeRequest {
  env?: string(name='Env', example='PROD'),
  nodeId?: string(name='NodeId', description='This parameter is required.', example='n_232132'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetPhysicalNodeResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  nodeInfo?: {
    createTime?: long(name='CreateTime', example='1717343597000'),
    creator?: {
      id?: string(name='Id', example='101312'),
      name?: string(name='Name'),
    }(name='Creator'),
    cronExpression?: string(name='CronExpression', example='0 0 10 * * *'),
    dataSourceId?: long(name='DataSourceId', example='123456789'),
    dataSourceSchema?: string(name='DataSourceSchema', example='null'),
    description?: string(name='Description'),
    from?: string(name='From', example='DATA_PROCESS'),
    id?: string(name='Id', example='n_232132'),
    lastModifiedTime?: long(name='LastModifiedTime', example='1717343597000'),
    modifier?: {
      id?: string(name='Id', example='101312'),
      name?: string(name='Name'),
    }(name='Modifier'),
    name?: string(name='Name'),
    operatorType?: string(name='OperatorType', example='SHELL'),
    outputNameList?: [ string ](name='OutputNameList'),
    owner?: {
      id?: string(name='Id', example='101312'),
      name?: string(name='Name'),
    }(name='Owner'),
    priority?: string(name='Priority', example='MIDDLE'),
    projectInfo?: {
      id?: string(name='Id', example='102132'),
      name?: string(name='Name'),
    }(name='ProjectInfo'),
    scheduleType?: string(name='ScheduleType', example='DAILY'),
    status?: string(name='Status', example='SUCCESS'),
    triggerConfig?: string(name='TriggerConfig', example='{"expression":"any_success"}'),
  }(name='NodeInfo'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetPhysicalNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPhysicalNodeResponseBody(name='body'),
}

/**
 * @summary 查询物理调度节点。
 *
 * @param request GetPhysicalNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPhysicalNodeResponse
 */
async function getPhysicalNodeWithOptions(request: GetPhysicalNodeRequest, runtime: $RuntimeOptions): GetPhysicalNodeResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.nodeId)) {
    query['NodeId'] = request.nodeId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPhysicalNode',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询物理调度节点。
 *
 * @param request GetPhysicalNodeRequest
 * @return GetPhysicalNodeResponse
 */
async function getPhysicalNode(request: GetPhysicalNodeRequest): GetPhysicalNodeResponse {
  var runtime = new $RuntimeOptions{};
  return getPhysicalNodeWithOptions(request, runtime);
}

model GetPhysicalNodeByOutputNameRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  outputName?: string(name='OutputName', description='This parameter is required.', example='t_test'),
}

model GetPhysicalNodeByOutputNameResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  nodeInfo?: {
    createTime?: long(name='CreateTime', example='1717343597000'),
    creator?: {
      id?: string(name='Id', example='1311131'),
      name?: string(name='Name'),
    }(name='Creator'),
    description?: string(name='Description'),
    from?: string(name='From', example='DATA_PROCESS'),
    id?: string(name='Id', example='n_2321'),
    lastModifiedTime?: long(name='LastModifiedTime', example='1717343597000'),
    modifier?: {
      id?: string(name='Id', example='1311131'),
      name?: string(name='Name'),
    }(name='Modifier'),
    name?: string(name='Name'),
    operatorType?: string(name='OperatorType', example='SHELL'),
    owner?: {
      id?: string(name='Id', example='1311131'),
      name?: string(name='Name'),
    }(name='Owner'),
    priority?: string(name='Priority', example='MIDDLE'),
    projectInfo?: {
      id?: string(name='Id', example='1324211'),
      name?: string(name='Name'),
    }(name='ProjectInfo'),
    scheduleType?: string(name='ScheduleType', example='DAILY'),
    status?: string(name='Status', example='SUCCESS'),
    triggerConfig?: string(name='TriggerConfig', example='{"expression":"any_success"}'),
  }(name='NodeInfo'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetPhysicalNodeByOutputNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPhysicalNodeByOutputNameResponseBody(name='body'),
}

/**
 * @summary 根据输出名查询对应的物理节点。
 *
 * @param request GetPhysicalNodeByOutputNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPhysicalNodeByOutputNameResponse
 */
async function getPhysicalNodeByOutputNameWithOptions(request: GetPhysicalNodeByOutputNameRequest, runtime: $RuntimeOptions): GetPhysicalNodeByOutputNameResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.outputName)) {
    query['OutputName'] = request.outputName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPhysicalNodeByOutputName',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据输出名查询对应的物理节点。
 *
 * @param request GetPhysicalNodeByOutputNameRequest
 * @return GetPhysicalNodeByOutputNameResponse
 */
async function getPhysicalNodeByOutputName(request: GetPhysicalNodeByOutputNameRequest): GetPhysicalNodeByOutputNameResponse {
  var runtime = new $RuntimeOptions{};
  return getPhysicalNodeByOutputNameWithOptions(request, runtime);
}

model GetPhysicalNodeContentRequest {
  env?: string(name='Env', example='PROD'),
  nodeId?: string(name='NodeId', description='This parameter is required.', example='n_232411'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetPhysicalNodeContentResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    codeContent?: string(name='CodeContent', example='select 1;'),
    nodeId?: string(name='NodeId', example='n_232411'),
    nodeName?: string(name='NodeName'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetPhysicalNodeContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPhysicalNodeContentResponseBody(name='body'),
}

/**
 * @summary 查询调度节点代码内容。
 *
 * @param request GetPhysicalNodeContentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPhysicalNodeContentResponse
 */
async function getPhysicalNodeContentWithOptions(request: GetPhysicalNodeContentRequest, runtime: $RuntimeOptions): GetPhysicalNodeContentResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.nodeId)) {
    query['NodeId'] = request.nodeId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPhysicalNodeContent',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询调度节点代码内容。
 *
 * @param request GetPhysicalNodeContentRequest
 * @return GetPhysicalNodeContentResponse
 */
async function getPhysicalNodeContent(request: GetPhysicalNodeContentRequest): GetPhysicalNodeContentResponse {
  var runtime = new $RuntimeOptions{};
  return getPhysicalNodeContentWithOptions(request, runtime);
}

model GetPhysicalNodeOperationLogRequest {
  env?: string(name='Env', example='PROD'),
  nodeId?: string(name='NodeId', description='This parameter is required.', example='n_231131'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetPhysicalNodeOperationLogResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  operationLogList?: [ 
    {
      context?: string(name='Context', example='xx'),
      operationTime?: string(name='OperationTime', example='2024-05-30 16:47:13'),
      operationType?: string(name='OperationType', example='PAUSE_TASK'),
      operator?: string(name='Operator', example='132222'),
      operatorName?: string(name='OperatorName'),
    }
  ](name='OperationLogList'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetPhysicalNodeOperationLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPhysicalNodeOperationLogResponseBody(name='body'),
}

/**
 * @summary 查询节点的操作日志。
 *
 * @param request GetPhysicalNodeOperationLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPhysicalNodeOperationLogResponse
 */
async function getPhysicalNodeOperationLogWithOptions(request: GetPhysicalNodeOperationLogRequest, runtime: $RuntimeOptions): GetPhysicalNodeOperationLogResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.nodeId)) {
    query['NodeId'] = request.nodeId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPhysicalNodeOperationLog',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询节点的操作日志。
 *
 * @param request GetPhysicalNodeOperationLogRequest
 * @return GetPhysicalNodeOperationLogResponse
 */
async function getPhysicalNodeOperationLog(request: GetPhysicalNodeOperationLogRequest): GetPhysicalNodeOperationLogResponse {
  var runtime = new $RuntimeOptions{};
  return getPhysicalNodeOperationLogWithOptions(request, runtime);
}

model GetProjectProduceUserRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131311111321'),
}

model GetProjectProduceUserResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  user?: {
    id?: string(name='Id', example='123131'),
  }(name='User'),
}

model GetProjectProduceUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetProjectProduceUserResponseBody(name='body'),
}

/**
 * @summary 获取项目生产账号
 *
 * @param request GetProjectProduceUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetProjectProduceUserResponse
 */
async function getProjectProduceUserWithOptions(request: GetProjectProduceUserRequest, runtime: $RuntimeOptions): GetProjectProduceUserResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetProjectProduceUser',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取项目生产账号
 *
 * @param request GetProjectProduceUserRequest
 * @return GetProjectProduceUserResponse
 */
async function getProjectProduceUser(request: GetProjectProduceUserRequest): GetProjectProduceUserResponse {
  var runtime = new $RuntimeOptions{};
  return getProjectProduceUserWithOptions(request, runtime);
}

model GetQueueEngineVersionByEnvRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.', example='61187014-a3ba-4cdd-8609-1f0aa3df4a3d'),
  env?: string(name='Env', description='This parameter is required.', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='7081229106458752'),
  queueName?: string(name='QueueName', description='This parameter is required.', example='default-queue'),
  streamBatchMode?: string(name='StreamBatchMode', description='This parameter is required.', example='BOTH'),
}

model GetQueueEngineVersionByEnvResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ string ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetQueueEngineVersionByEnvResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetQueueEngineVersionByEnvResponseBody(name='body'),
}

/**
 * @summary 根据集群ID获取集群版本
 *
 * @param request GetQueueEngineVersionByEnvRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetQueueEngineVersionByEnvResponse
 */
async function getQueueEngineVersionByEnvWithOptions(request: GetQueueEngineVersionByEnvRequest, runtime: $RuntimeOptions): GetQueueEngineVersionByEnvResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.queueName)) {
    query['QueueName'] = request.queueName;
  }
  if (!$isNull(request.streamBatchMode)) {
    query['StreamBatchMode'] = request.streamBatchMode;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetQueueEngineVersionByEnv',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据集群ID获取集群版本
 *
 * @param request GetQueueEngineVersionByEnvRequest
 * @return GetQueueEngineVersionByEnvResponse
 */
async function getQueueEngineVersionByEnv(request: GetQueueEngineVersionByEnvRequest): GetQueueEngineVersionByEnvResponse {
  var runtime = new $RuntimeOptions{};
  return getQueueEngineVersionByEnvWithOptions(request, runtime);
}

model GetSparkLocalClientInfoRequest {
  envEnum?: string(name='EnvEnum', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: string(name='ProjectId', description='This parameter is required.'),
}

model GetSparkLocalClientInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      clientFileResourceId?: string(name='ClientFileResourceId', example='XXXX-XXXX-XXXX-XXXX'),
      clientFileResourceName?: string(name='ClientFileResourceName', example='spark-cleint.zip'),
      clientName?: string(name='ClientName', example='spark-clinet'),
      editable?: boolean(name='Editable', example='true/false'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model GetSparkLocalClientInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSparkLocalClientInfoResponseBody(name='body'),
}

/**
 * @summary 获取计算源对应集群的spark客户信息
 *
 * @param request GetSparkLocalClientInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSparkLocalClientInfoResponse
 */
async function getSparkLocalClientInfoWithOptions(request: GetSparkLocalClientInfoRequest, runtime: $RuntimeOptions): GetSparkLocalClientInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.envEnum)) {
    query['EnvEnum'] = request.envEnum;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetSparkLocalClientInfo',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取计算源对应集群的spark客户信息
 *
 * @param request GetSparkLocalClientInfoRequest
 * @return GetSparkLocalClientInfoResponse
 */
async function getSparkLocalClientInfo(request: GetSparkLocalClientInfoRequest): GetSparkLocalClientInfoResponse {
  var runtime = new $RuntimeOptions{};
  return getSparkLocalClientInfoWithOptions(request, runtime);
}

model GetSupplementDagrunRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  supplementId?: string(name='SupplementId', description='This parameter is required.', example='f_8241792_20201202_2099680'),
}

model GetSupplementDagrunResponseBody = {
  code?: string(name='Code', example='OK'),
  dagrunList?: [ 
    {
      bizDate?: string(name='BizDate', example='2024-04-01'),
      duration?: string(name='Duration', example='60s'),
      endExecuteTime?: long(name='EndExecuteTime', example='1717081789000'),
      id?: string(name='Id', description='Dagrun ID', example='dr_2242792_14542'),
      startExecuteTime?: long(name='StartExecuteTime', example='1717081729000'),
      status?: string(name='Status', example='RUNNING'),
      supplementId?: string(name='SupplementId', example='f_8241792_20201202_2099680'),
    }
  ](name='DagrunList'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetSupplementDagrunResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSupplementDagrunResponseBody(name='body'),
}

/**
 * @summary 获取补数据工作流所有业务日期的Dagrun信息。
 *
 * @param request GetSupplementDagrunRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSupplementDagrunResponse
 */
async function getSupplementDagrunWithOptions(request: GetSupplementDagrunRequest, runtime: $RuntimeOptions): GetSupplementDagrunResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.supplementId)) {
    query['SupplementId'] = request.supplementId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetSupplementDagrun',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取补数据工作流所有业务日期的Dagrun信息。
 *
 * @param request GetSupplementDagrunRequest
 * @return GetSupplementDagrunResponse
 */
async function getSupplementDagrun(request: GetSupplementDagrunRequest): GetSupplementDagrunResponse {
  var runtime = new $RuntimeOptions{};
  return getSupplementDagrunWithOptions(request, runtime);
}

model GetSupplementDagrunInstanceRequest {
  dagrunId?: string(name='DagrunId', description='Dagrun ID

This parameter is required.', example='dr_2242792_14542'),
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GetSupplementDagrunInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceList?: [ 
    {
      bizDate?: long(name='BizDate', example='2024-04-01'),
      dueTime?: long(name='DueTime', example='2024-04-02'),
      duration?: string(name='Duration', example='60'),
      endExecuteTime?: long(name='EndExecuteTime', example='2024-04-12 00:25:02'),
      extendInfo?: string(name='ExtendInfo', example='{"a":"b"}'),
      id?: string(name='Id', example='t_239496_20210411_246982077481'),
      index?: int32(name='Index', example='1'),
      nodeInfo?: {
        bizUnitName?: string(name='BizUnitName', example='xx测试'),
        createTime?: string(name='CreateTime', example='2024-01-30 10:08:49'),
        creator?: {
          id?: string(name='Id', example='1001012'),
          name?: string(name='Name', example='xx测试'),
        }(name='Creator'),
        description?: string(name='Description', example='xx测试'),
        dryRun?: boolean(name='DryRun', example='true'),
        from?: string(name='From', example='DATA_PROCESS'),
        hasDev?: boolean(name='HasDev', example='true'),
        hasProd?: boolean(name='HasProd', example='true'),
        id?: string(name='Id', example='n_239496'),
        lastModifiedTime?: string(name='LastModifiedTime', example='2024-01-30 10:08:49'),
        modifier?: {
          id?: string(name='Id', example='1001012'),
          name?: string(name='Name', example='xx测试'),
        }(name='Modifier'),
        name?: string(name='Name', example='xx测试'),
        ownerList?: [ 
          {
            id?: string(name='Id', example='1001012'),
            name?: string(name='Name', example='xx测试'),
          }
        ](name='OwnerList'),
        priorityList?: [ string ](name='PriorityList'),
        resourceGroupList?: [ string ](name='ResourceGroupList'),
        schedulePaused?: boolean(name='SchedulePaused', example='true'),
        schedulePeriodList?: [ string ](name='SchedulePeriodList'),
        subDetailType?: string(name='SubDetailType', example='SHELL'),
        type?: string(name='Type', example='DATA_PROCESS'),
      }(name='NodeInfo'),
      startExecuteTime?: long(name='StartExecuteTime', example='2024-04-12 00:00:00'),
      statusList?: [ string ](name='StatusList'),
      type?: string(name='Type', example='SUPPLEMENT'),
    }
  ](name='InstanceList'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetSupplementDagrunInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSupplementDagrunInstanceResponseBody(name='body'),
}

/**
 * @summary 列出补数据工作流下具体一个业务日期的所有节点的实例。
 *
 * @param request GetSupplementDagrunInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSupplementDagrunInstanceResponse
 */
async function getSupplementDagrunInstanceWithOptions(request: GetSupplementDagrunInstanceRequest, runtime: $RuntimeOptions): GetSupplementDagrunInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.dagrunId)) {
    query['DagrunId'] = request.dagrunId;
  }
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetSupplementDagrunInstance',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出补数据工作流下具体一个业务日期的所有节点的实例。
 *
 * @param request GetSupplementDagrunInstanceRequest
 * @return GetSupplementDagrunInstanceResponse
 */
async function getSupplementDagrunInstance(request: GetSupplementDagrunInstanceRequest): GetSupplementDagrunInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return getSupplementDagrunInstanceWithOptions(request, runtime);
}

model GetTableColumnLineageByTaskIdRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  tableColumnLineageByTaskIdQuery?: {
    needNotExistObject?: boolean(name='NeedNotExistObject'),
    taskEnv?: string(name='TaskEnv', example='DEV'),
    taskId?: string(name='TaskId', description='This parameter is required.', example='n_123'),
  }(name='TableColumnLineageByTaskIdQuery', description='This parameter is required.'),
}

model GetTableColumnLineageByTaskIdShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  tableColumnLineageByTaskIdQueryShrink?: string(name='TableColumnLineageByTaskIdQuery', description='This parameter is required.'),
}

model GetTableColumnLineageByTaskIdResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      inputBizUnitId?: long(name='InputBizUnitId', example='123'),
      inputColumnId?: string(name='InputColumnId', example='odps.123.test_project.input_table.id'),
      inputColumnName?: string(name='InputColumnName', example='id'),
      inputDataSourceId?: long(name='InputDataSourceId', example='123'),
      inputDataSourceType?: string(name='InputDataSourceType', example='MAX_COMPUTE'),
      inputDbType?: string(name='InputDbType', example='MAX_COMPUTE'),
      inputEnv?: string(name='InputEnv', example='DEV'),
      inputProjectId?: long(name='InputProjectId', example='123'),
      inputTableDeleted?: boolean(name='InputTableDeleted'),
      inputTableId?: string(name='InputTableId', example='odps.123.test_project.order'),
      inputTableName?: string(name='InputTableName', example='order'),
      inputTableType?: string(name='InputTableType', example='PHYSICAL_TABLE'),
      outputBizUnitId?: long(name='OutputBizUnitId', example='123'),
      outputColumnId?: string(name='OutputColumnId', example='odps.123.test_project.input_table.id'),
      outputColumnName?: string(name='OutputColumnName', example='id'),
      outputDataSourceId?: long(name='OutputDataSourceId', example='123'),
      outputDataSourceType?: string(name='OutputDataSourceType', example='MAX_COMPUTE'),
      outputDbType?: string(name='OutputDbType', example='MAX_COMPUTE'),
      outputEnv?: string(name='OutputEnv', example='DEV'),
      outputProjectId?: long(name='OutputProjectId', example='123'),
      outputTableDeleted?: boolean(name='OutputTableDeleted'),
      outputTableId?: string(name='OutputTableId', example='odps.123.test_project.order'),
      outputTableName?: string(name='OutputTableName', example='order'),
      outputTableType?: string(name='OutputTableType', example='PHYSICAL_TABLE'),
      taskEnv?: string(name='TaskEnv', example='DEV'),
      taskId?: string(name='TaskId', example='n_123'),
      tenantId?: long(name='TenantId', example='12345'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetTableColumnLineageByTaskIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTableColumnLineageByTaskIdResponseBody(name='body'),
}

/**
 * @summary 查询表字段血缘信息
 *
 * @param tmpReq GetTableColumnLineageByTaskIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTableColumnLineageByTaskIdResponse
 */
async function getTableColumnLineageByTaskIdWithOptions(tmpReq: GetTableColumnLineageByTaskIdRequest, runtime: $RuntimeOptions): GetTableColumnLineageByTaskIdResponse {
  tmpReq.validate();
  var request = new GetTableColumnLineageByTaskIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.tableColumnLineageByTaskIdQuery)) {
    request.tableColumnLineageByTaskIdQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tableColumnLineageByTaskIdQuery, 'TableColumnLineageByTaskIdQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.tableColumnLineageByTaskIdQueryShrink)) {
    body['TableColumnLineageByTaskIdQuery'] = request.tableColumnLineageByTaskIdQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetTableColumnLineageByTaskId',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询表字段血缘信息
 *
 * @param request GetTableColumnLineageByTaskIdRequest
 * @return GetTableColumnLineageByTaskIdResponse
 */
async function getTableColumnLineageByTaskId(request: GetTableColumnLineageByTaskIdRequest): GetTableColumnLineageByTaskIdResponse {
  var runtime = new $RuntimeOptions{};
  return getTableColumnLineageByTaskIdWithOptions(request, runtime);
}

model GetTableLineageByTaskIdRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  tableLineageByTaskIdQuery?: {
    needNotExistObject?: boolean(name='NeedNotExistObject'),
    taskEnv?: string(name='TaskEnv', example='DEV'),
    taskId?: string(name='TaskId', description='This parameter is required.', example='n_123'),
  }(name='TableLineageByTaskIdQuery', description='This parameter is required.'),
}

model GetTableLineageByTaskIdShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  tableLineageByTaskIdQueryShrink?: string(name='TableLineageByTaskIdQuery', description='This parameter is required.'),
}

model GetTableLineageByTaskIdResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: [ 
    {
      inputBizUnitId?: long(name='InputBizUnitId', example='123'),
      inputDataSourceId?: long(name='InputDataSourceId', example='123'),
      inputDataSourceType?: string(name='InputDataSourceType', example='MAX_COMPUTE'),
      inputDbType?: string(name='InputDbType', example='MAX_COMPUTE'),
      inputEnv?: string(name='InputEnv', example='DEV'),
      inputProjectId?: long(name='InputProjectId', example='123'),
      inputTableDeleted?: boolean(name='InputTableDeleted'),
      inputTableId?: string(name='InputTableId', example='odps.123.test_project.order'),
      inputTableName?: string(name='InputTableName', example='order'),
      inputTableType?: string(name='InputTableType', example='PHYSICAL_TABLE'),
      outputBizUnitId?: long(name='OutputBizUnitId', example='123'),
      outputDataSourceId?: long(name='OutputDataSourceId', example='123'),
      outputDataSourceType?: string(name='OutputDataSourceType', example='MAX_COMPUTE'),
      outputDbType?: string(name='OutputDbType', example='MAX_COMPUTE'),
      outputEnv?: string(name='OutputEnv', example='DEV/PROD'),
      outputProjectId?: long(name='OutputProjectId', example='123'),
      outputTableDeleted?: boolean(name='OutputTableDeleted'),
      outputTableId?: string(name='OutputTableId', example='odps.123.test_project.order'),
      outputTableName?: string(name='OutputTableName', example='order'),
      outputTableType?: string(name='OutputTableType', example='PHYSICAL_TABLE'),
      taskEnv?: string(name='TaskEnv', example='DEV'),
      taskId?: string(name='TaskId', example='n_123'),
      tenantId?: long(name='TenantId', example='12345'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GetTableLineageByTaskIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTableLineageByTaskIdResponseBody(name='body'),
}

/**
 * @summary 查询表血缘信息
 *
 * @param tmpReq GetTableLineageByTaskIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTableLineageByTaskIdResponse
 */
async function getTableLineageByTaskIdWithOptions(tmpReq: GetTableLineageByTaskIdRequest, runtime: $RuntimeOptions): GetTableLineageByTaskIdResponse {
  tmpReq.validate();
  var request = new GetTableLineageByTaskIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.tableLineageByTaskIdQuery)) {
    request.tableLineageByTaskIdQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tableLineageByTaskIdQuery, 'TableLineageByTaskIdQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.tableLineageByTaskIdQueryShrink)) {
    body['TableLineageByTaskIdQuery'] = request.tableLineageByTaskIdQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetTableLineageByTaskId',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询表血缘信息
 *
 * @param request GetTableLineageByTaskIdRequest
 * @return GetTableLineageByTaskIdResponse
 */
async function getTableLineageByTaskId(request: GetTableLineageByTaskIdRequest): GetTableLineageByTaskIdResponse {
  var runtime = new $RuntimeOptions{};
  return getTableLineageByTaskIdWithOptions(request, runtime);
}

model GetUserBySourceIdRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  sourceId?: string(name='SourceId', description='This parameter is required.', example='323131'),
}

model GetUserBySourceIdResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  user?: {
    displayName?: string(name='DisplayName'),
    id?: string(name='Id', example='23231231'),
  }(name='User'),
}

model GetUserBySourceIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserBySourceIdResponseBody(name='body'),
}

/**
 * @summary 通过用户原始Id（如阿里云Id）获取用户详情
 *
 * @param request GetUserBySourceIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserBySourceIdResponse
 */
async function getUserBySourceIdWithOptions(request: GetUserBySourceIdRequest, runtime: $RuntimeOptions): GetUserBySourceIdResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.sourceId)) {
    query['SourceId'] = request.sourceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetUserBySourceId',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过用户原始Id（如阿里云Id）获取用户详情
 *
 * @param request GetUserBySourceIdRequest
 * @return GetUserBySourceIdResponse
 */
async function getUserBySourceId(request: GetUserBySourceIdRequest): GetUserBySourceIdResponse {
  var runtime = new $RuntimeOptions{};
  return getUserBySourceIdWithOptions(request, runtime);
}

model GetUserGroupRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='1313213'),
}

model GetUserGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  userGroupInfo?: {
    active?: boolean(name='Active', example='true'),
    adminList?: [ 
      {
        accountName?: string(name='AccountName', example='xx'),
        displayName?: string(name='DisplayName'),
        id?: string(name='Id', example='131313'),
      }
    ](name='AdminList'),
    description?: string(name='Description', example='xx'),
    id?: string(name='Id', example='1313213'),
    myRole?: string(name='MyRole', example='xx'),
    name?: string(name='Name'),
  }(name='UserGroupInfo'),
}

model GetUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserGroupResponseBody(name='body'),
}

/**
 * @summary 获取用户组详情.
 *
 * @param request GetUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserGroupResponse
 */
async function getUserGroupWithOptions(request: GetUserGroupRequest, runtime: $RuntimeOptions): GetUserGroupResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetUserGroup',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户组详情.
 *
 * @param request GetUserGroupRequest
 * @return GetUserGroupResponse
 */
async function getUserGroup(request: GetUserGroupRequest): GetUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return getUserGroupWithOptions(request, runtime);
}

model GetUsersRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  userIdList?: [ string ](name='UserIdList', description='This parameter is required.'),
}

model GetUsersShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  userIdListShrink?: string(name='UserIdList', description='This parameter is required.'),
}

model GetUsersResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
  userList?: [ 
    {
      accountName?: string(name='AccountName', example='123@xx.com'),
      dingNumber?: string(name='DingNumber', example='123@dingding'),
      displayName?: string(name='DisplayName'),
      displayNameWithoutStatus?: string(name='DisplayNameWithoutStatus'),
      enableWhiteIp?: string(name='EnableWhiteIp', example='true'),
      feiShuRobot?: string(name='FeiShuRobot', example='xx'),
      gmtCreate?: long(name='GmtCreate', example='1717343597000'),
      gmtModified?: long(name='GmtModified', example='1717343597000'),
      id?: string(name='Id', example='1233121'),
      mail?: string(name='Mail', example='123@xx.com'),
      mobilePhone?: string(name='MobilePhone', example='1388888888'),
      name?: string(name='Name'),
      nickName?: string(name='NickName'),
      parentId?: string(name='ParentId', example='231231'),
      realName?: string(name='RealName'),
      sourceId?: string(name='SourceId', example='123@xx.com'),
      sourceType?: string(name='SourceType', example='ALIYUN'),
      weChatRobot?: string(name='WeChatRobot', example='xx'),
      whiteIp?: string(name='WhiteIp', example='*'),
    }
  ](name='UserList'),
}

model GetUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUsersResponseBody(name='body'),
}

/**
 * @summary 获取用户详情
 *
 * @param tmpReq GetUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUsersResponse
 */
async function getUsersWithOptions(tmpReq: GetUsersRequest, runtime: $RuntimeOptions): GetUsersResponse {
  tmpReq.validate();
  var request = new GetUsersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.userIdList)) {
    request.userIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userIdList, 'UserIdList', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.userIdListShrink)) {
    body['UserIdList'] = request.userIdListShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetUsers',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户详情
 *
 * @param request GetUsersRequest
 * @return GetUsersResponse
 */
async function getUsers(request: GetUsersRequest): GetUsersResponse {
  var runtime = new $RuntimeOptions{};
  return getUsersWithOptions(request, runtime);
}

model GrantResourcePermissionRequest {
  grantCommand?: {
    effectiveEnd?: string(name='EffectiveEnd', description='This parameter is required.', example='1717343597000'),
    operateList?: [ string ](name='OperateList', description='This parameter is required.'),
    reason?: string(name='Reason', example='xx'),
    resourceList?: [ 
      {
        resourceId?: string(name='ResourceId', example='hadoop.300000806.data_distill.behavior_gameinfor_01'),
      }
    ](name='ResourceList', description='This parameter is required.'),
    resourceType?: string(name='ResourceType', description='This parameter is required.', example='PHYSICAL_TABLE'),
    userIdList?: [ string ](name='UserIdList', description='This parameter is required.'),
  }(name='GrantCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GrantResourcePermissionShrinkRequest {
  grantCommandShrink?: string(name='GrantCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model GrantResourcePermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model GrantResourcePermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GrantResourcePermissionResponseBody(name='body'),
}

/**
 * @summary 通过资源点对用户授权
 *
 * @param tmpReq GrantResourcePermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GrantResourcePermissionResponse
 */
async function grantResourcePermissionWithOptions(tmpReq: GrantResourcePermissionRequest, runtime: $RuntimeOptions): GrantResourcePermissionResponse {
  tmpReq.validate();
  var request = new GrantResourcePermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.grantCommand)) {
    request.grantCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.grantCommand, 'GrantCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.grantCommandShrink)) {
    body['GrantCommand'] = request.grantCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GrantResourcePermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过资源点对用户授权
 *
 * @param request GrantResourcePermissionRequest
 * @return GrantResourcePermissionResponse
 */
async function grantResourcePermission(request: GrantResourcePermissionRequest): GrantResourcePermissionResponse {
  var runtime = new $RuntimeOptions{};
  return grantResourcePermissionWithOptions(request, runtime);
}

model ListAddableRolesRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAddableRolesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  roleList?: [ 
    {
      code?: string(name='Code', example='SECURITY_ADMIN'),
      name?: string(name='Name'),
    }
  ](name='RoleList'),
  success?: boolean(name='Success', example='true'),
}

model ListAddableRolesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAddableRolesResponseBody(name='body'),
}

/**
 * @summary 获取用户角色列表
 *
 * @param request ListAddableRolesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAddableRolesResponse
 */
async function listAddableRolesWithOptions(request: ListAddableRolesRequest, runtime: $RuntimeOptions): ListAddableRolesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListAddableRoles',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户角色列表
 *
 * @param request ListAddableRolesRequest
 * @return ListAddableRolesResponse
 */
async function listAddableRoles(request: ListAddableRolesRequest): ListAddableRolesResponse {
  var runtime = new $RuntimeOptions{};
  return listAddableRolesWithOptions(request, runtime);
}

model ListAddableUsersRequest {
  listQuery?: {
    page?: int32(name='Page', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    searchText?: string(name='SearchText', example='xx'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAddableUsersShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAddableUsersResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    totalCount?: int32(name='TotalCount', example='66'),
    userList?: [ 
      {
        accountName?: string(name='AccountName', example='123@xx.com'),
        dingNumber?: string(name='DingNumber', example='123@dingding'),
        displayName?: string(name='DisplayName', example='xx'),
        displayNameWithoutStatus?: string(name='DisplayNameWithoutStatus', example='xx'),
        enableWhiteIp?: string(name='EnableWhiteIp', example='true'),
        feiShuRobot?: string(name='FeiShuRobot', example='xx'),
        gmtCreate?: long(name='GmtCreate', example='1717343597000'),
        gmtModified?: long(name='GmtModified', example='1717343597000'),
        id?: string(name='Id', example='123231'),
        mail?: string(name='Mail', example='123@xx.com'),
        mobilePhone?: string(name='MobilePhone', example='13888888888'),
        name?: string(name='Name', example='xx'),
        nickName?: string(name='NickName', example='xx'),
        parentId?: string(name='ParentId', example='231313'),
        realName?: string(name='RealName', example='xx'),
        sourceId?: string(name='SourceId', example='123@xx.com'),
        sourceType?: string(name='SourceType', example='aliyun'),
        weChatRobot?: string(name='WeChatRobot', example='xx'),
        whiteIp?: string(name='WhiteIp', example='*'),
      }
    ](name='UserList'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListAddableUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAddableUsersResponseBody(name='body'),
}

/**
 * @summary 获取可加入租户成员列表的用户
 *
 * @param tmpReq ListAddableUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAddableUsersResponse
 */
async function listAddableUsersWithOptions(tmpReq: ListAddableUsersRequest, runtime: $RuntimeOptions): ListAddableUsersResponse {
  tmpReq.validate();
  var request = new ListAddableUsersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListAddableUsers',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取可加入租户成员列表的用户
 *
 * @param request ListAddableUsersRequest
 * @return ListAddableUsersResponse
 */
async function listAddableUsers(request: ListAddableUsersRequest): ListAddableUsersResponse {
  var runtime = new $RuntimeOptions{};
  return listAddableUsersWithOptions(request, runtime);
}

model ListAlertEventsRequest {
  listQuery?: {
    alertEndTime?: string(name='AlertEndTime', description='This parameter is required.', example='2024-11-27 13:47:00'),
    alertObjectTypeList?: [ string ](name='AlertObjectTypeList'),
    alertReasonList?: [ string ](name='AlertReasonList'),
    alertStartTime?: string(name='AlertStartTime', description='This parameter is required.', example='2024-11-16 00:00:00'),
    bizNameList?: [ string ](name='BizNameList'),
    keyword?: string(name='Keyword', example='test'),
    monitoredItemIdList?: [ string ](name='MonitoredItemIdList'),
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
    projectNameList?: [ string ](name='ProjectNameList'),
    sourceSystem?: string(name='SourceSystem', description='This parameter is required.', example='ALL'),
    statusList?: [ string ](name='StatusList'),
    userIdList?: [ string ](name='UserIdList'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAlertEventsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAlertEventsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  listResult?: {
    data?: [ 
      {
        alertFrequency?: string(name='AlertFrequency', example='ONCE'),
        alertObject?: {
          name?: string(name='Name', example='test'),
          sourceSystemType?: string(name='SourceSystemType', example='VDM_BATCH'),
          type?: string(name='Type', example='STREAM_TASK'),
        }(name='AlertObject'),
        alertReason?: {
          alertReasonParamList?: [ 
            {
              key?: string(name='Key', example='biz_date'),
              value?: string(name='Value', example='2024-11-24 00:00:00'),
            }
          ](name='AlertReasonParamList'),
          bizDate?: string(name='BizDate', example='2024-11-25 10:02:47'),
          type?: string(name='Type', example='VDM_BATCH_FINISH'),
          uniqueKey?: string(name='UniqueKey', example='t_6340134343289405440_20241124_639873707610'),
        }(name='AlertReason'),
        alertReceiverList?: [ 
          {
            alertChannelTypeList?: [ string ](name='AlertChannelTypeList'),
            customAlertChannelIdList?: [ string ](name='CustomAlertChannelIdList'),
            onCallTableName?: string(name='OnCallTableName', example='test'),
            type?: string(name='Type', example='OWNER'),
            userList?: [ 
              {
                name?: string(name='Name', example='ADMIN'),
              }
            ](name='UserList'),
          }
        ](name='AlertReceiverList'),
        belongProject?: {
          bizName?: string(name='BizName', example='biz_1'),
          projectName?: string(name='ProjectName', example='project_1'),
        }(name='BelongProject'),
        doNotDisturbEndTime?: string(name='DoNotDisturbEndTime', example='2024-11-25 00:00:00'),
        firstAlertTime?: string(name='FirstAlertTime', example='2024-11-25 10:02:47'),
        id?: string(name='Id', example='12345'),
        latestAlertTime?: string(name='LatestAlertTime', example='2024-11-25 10:02:47'),
        status?: string(name='Status', example='FINISH'),
        totalAlertTimes?: long(name='TotalAlertTimes', example='1'),
        urlConfig?: {
          alertConfigUrl?: string(name='AlertConfigUrl', example='https://dataphin.com/ops/test3'),
          logUrl?: string(name='LogUrl', example='https://dataphin.com/ops/test2'),
          objectUrl?: string(name='ObjectUrl', example='https://dataphin.com/ops/test1'),
        }(name='UrlConfig'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='5'),
  }(name='ListResult'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='True'),
}

model ListAlertEventsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAlertEventsResponseBody(name='body'),
}

/**
 * @summary 根据条件查询多个告警事件
 *
 * @param tmpReq ListAlertEventsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAlertEventsResponse
 */
async function listAlertEventsWithOptions(tmpReq: ListAlertEventsRequest, runtime: $RuntimeOptions): ListAlertEventsResponse {
  tmpReq.validate();
  var request = new ListAlertEventsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListAlertEvents',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据条件查询多个告警事件
 *
 * @param request ListAlertEventsRequest
 * @return ListAlertEventsResponse
 */
async function listAlertEvents(request: ListAlertEventsRequest): ListAlertEventsResponse {
  var runtime = new $RuntimeOptions{};
  return listAlertEventsWithOptions(request, runtime);
}

model ListAlertNotificationsRequest {
  listQuery?: {
    alertReasonList?: [ string ](name='AlertReasonList'),
    channelTypeList?: [ string ](name='ChannelTypeList'),
    customChannelIdList?: [ string ](name='CustomChannelIdList'),
    keyword?: string(name='Keyword', example='test'),
    monitoredItemIdList?: [ string ](name='MonitoredItemIdList'),
    notifyEndTime?: string(name='NotifyEndTime', description='This parameter is required.', example='2024-11-27 13:47:00'),
    notifyStartTime?: string(name='NotifyStartTime', description='This parameter is required.', example='2024-11-16 00:00:00'),
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
    sourceSystem?: string(name='SourceSystem', description='This parameter is required.', example='ALL'),
    statusList?: [ string ](name='StatusList'),
    userIdList?: [ string ](name='UserIdList'),
  }(name='ListQuery'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAlertNotificationsShrinkRequest {
  listQueryShrink?: string(name='ListQuery'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAlertNotificationsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  listResult?: {
    data?: [ 
      {
        alertEventId?: string(name='AlertEventId', example='12345'),
        alertObject?: {
          name?: string(name='Name', example='test'),
          sourceSystemType?: string(name='SourceSystemType', example='VDM_BATCH'),
          type?: string(name='Type', example='VDM_BATCH_SHELL'),
        }(name='AlertObject'),
        alertReason?: {
          alertReasonParamList?: [ 
            {
              key?: string(name='Key', example='biz_date'),
              value?: string(name='Value', example='2024-11-24 00:00:00'),
            }
          ](name='AlertReasonParamList'),
          bizDate?: string(name='BizDate', example='20241125'),
          type?: string(name='Type', example='VDM_BATCH_FINISH'),
          uniqueKey?: string(name='UniqueKey', example='123456'),
        }(name='AlertReason'),
        alertReceiver?: {
          alertChannelType?: string(name='AlertChannelType', example='SMS'),
          customAlertChannelId?: string(name='CustomAlertChannelId', example='123456'),
          onCallTableId?: string(name='OnCallTableId', example='12345'),
          onCallTableName?: string(name='OnCallTableName', example='test'),
          type?: string(name='Type', example='OWNER'),
          user?: {
            name?: string(name='Name', example='ADMIN'),
          }(name='User'),
        }(name='AlertReceiver'),
        alertSend?: {
          failReason?: string(name='FailReason'),
          sendContent?: string(name='SendContent', example='test'),
          sendTime?: string(name='SendTime', example='2024-11-25 10:02:47'),
          status?: string(name='Status', example='SUCCESS'),
        }(name='AlertSend'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='5'),
  }(name='ListResult'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='True'),
}

model ListAlertNotificationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAlertNotificationsResponseBody(name='body'),
}

/**
 * @summary 根据条件查询多个推送记录
 *
 * @param tmpReq ListAlertNotificationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAlertNotificationsResponse
 */
async function listAlertNotificationsWithOptions(tmpReq: ListAlertNotificationsRequest, runtime: $RuntimeOptions): ListAlertNotificationsResponse {
  tmpReq.validate();
  var request = new ListAlertNotificationsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListAlertNotifications',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据条件查询多个推送记录
 *
 * @param request ListAlertNotificationsRequest
 * @return ListAlertNotificationsResponse
 */
async function listAlertNotifications(request: ListAlertNotificationsRequest): ListAlertNotificationsResponse {
  var runtime = new $RuntimeOptions{};
  return listAlertNotificationsWithOptions(request, runtime);
}

model ListApiByAppRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  pageQuery?: {
    appKey?: long(name='AppKey', description='appKey

This parameter is required.', example='10121101'),
    keyword?: string(name='Keyword', example='apiName'),
    pageNum?: int32(name='PageNum', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  }(name='PageQuery', description='This parameter is required.'),
}

model ListApiByAppShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  pageQueryShrink?: string(name='PageQuery', description='This parameter is required.'),
}

model ListApiByAppResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  listResult?: {
    data?: [ 
      {
        apiNo?: long(name='ApiNo', example='987654321'),
        apiTimeout?: long(name='ApiTimeout', example='30'),
        appName?: string(name='AppName', example='exampleApp'),
        bizModuleEnName?: string(name='BizModuleEnName', example='exampleModule'),
        cacheSwitch?: string(name='CacheSwitch', example='1'),
        cacheTime?: string(name='CacheTime', example='60'),
        createType?: long(name='CreateType', example='1'),
        dbEnv?: long(name='DbEnv', example='0'),
        description?: string(name='Description', example='这是一个示例API'),
        directDatasourceId?: long(name='DirectDatasourceId', example='54321'),
        directDatasourceName?: string(name='DirectDatasourceName', example='directDatasource'),
        groupId?: long(name='GroupId', example='67890'),
        groupName?: string(name='GroupName', example='exampleGroup'),
        id?: long(name='Id', example='12345'),
        isLogicalTable?: boolean(name='IsLogicalTable'),
        isPagedQuery?: long(name='IsPagedQuery', example='0'),
        maxReturnNum?: long(name='MaxReturnNum', example='100'),
        modelType?: long(name='ModelType', example='0'),
        name?: string(name='Name', example='exampleApi'),
        projId?: long(name='ProjId', example='112233'),
        projName?: string(name='ProjName', example='exampleProject'),
        protocol?: long(name='Protocol', example='3'),
        protocolName?: string(name='ProtocolName', example='HTTP和HTTPS'),
        publicParamList?: [ 
          {
            dateFormat?: string(name='DateFormat', example='yyyy-MM-dd'),
            defaultValue?: string(name='DefaultValue', example='default_public_value'),
            description?: string(name='Description', example='这是一个示例公共参数'),
            descriptionCode?: string(name='DescriptionCode', example='CODE_003'),
            id?: long(name='Id', example='3001'),
            initialValue?: string(name='InitialValue', example='app_key_value'),
            mappingColumn?: string(name='MappingColumn', example='publicColumn1'),
            must?: long(name='Must', example='1'),
            operator?: string(name='Operator', example='='),
            optional?: long(name='Optional', example='1'),
            originalColumn?: string(name='OriginalColumn', example='original_public_column'),
            paramName?: string(name='ParamName', example='publicParam1'),
            paramType?: string(name='ParamType', example='String'),
            parameterLocation?: string(name='ParameterLocation', example='/path/to/public_param'),
            sample?: string(name='Sample', example='publicValue1'),
            tableAndDsList?: [ 
              {
                datasourceId?: string(name='DatasourceId', example='ds54321'),
                datasourceName?: string(name='DatasourceName', example='publicDatasource'),
                datasourceType?: long(name='DatasourceType', example='3'),
                datasourceUrl?: string(name='DatasourceUrl', example='https://example.com/public_datasource'),
                tableName?: string(name='TableName', example='public_table'),
              }
            ](name='TableAndDsList', description='-'),
          }
        ](name='PublicParamList', description='-'),
        registerApi?: {
          apiId?: long(name='ApiId', example='67890'),
          authenticationMode?: string(name='AuthenticationMode', example='OAuth2'),
          datasourceId?: string(name='DatasourceId', example='ds67890'),
          datasourceName?: string(name='DatasourceName', example='registerDatasource'),
          failExample?: string(name='FailExample', example='{"status":"error","message":"Invalid request"}'),
          httpMethod?: long(name='HttpMethod', example='1'),
          modelType?: long(name='ModelType', example='0'),
          path?: string(name='Path', example='/api/v1/register'),
          protocol?: string(name='Protocol', example='HTTPS'),
          successExample?: string(name='SuccessExample', example='{"status":"success","data":[]}'),
          timeout?: long(name='Timeout', example='30'),
          url?: string(name='Url', example='https://example.com/register_api'),
        }(name='RegisterApi'),
        requestMethod?: long(name='RequestMethod', example='1'),
        requestMethodName?: string(name='RequestMethodName', example='GET'),
        requestParamList?: [ 
          {
            dateFormat?: string(name='DateFormat', example='yyyy-MM-dd'),
            defaultValue?: string(name='DefaultValue', example='default_value'),
            description?: string(name='Description', example='这是一个示例参数'),
            descriptionCode?: string(name='DescriptionCode', example='CODE_001'),
            id?: long(name='Id', example='1001'),
            initialValue?: string(name='InitialValue', example='app_key_value'),
            mappingColumn?: string(name='MappingColumn', example='column1'),
            must?: long(name='Must', example='1'),
            operator?: string(name='Operator', example='='),
            optional?: long(name='Optional', example='1'),
            originalColumn?: string(name='OriginalColumn', example='original_column'),
            paramName?: string(name='ParamName', example='param1'),
            paramType?: string(name='ParamType', example='String'),
            parameterLocation?: string(name='ParameterLocation', example='/path/to/param'),
            sample?: string(name='Sample', example='value1'),
            tableAndDsList?: [ 
              {
                datasourceId?: string(name='DatasourceId', example='ds12345'),
                datasourceName?: string(name='DatasourceName', example='exampleDatasource'),
                datasourceType?: long(name='DatasourceType', example='1'),
                datasourceUrl?: string(name='DatasourceUrl', example='https://example.com/datasource'),
                tableName?: string(name='TableName', example='example_table'),
              }
            ](name='TableAndDsList', description='-'),
          }
        ](name='RequestParamList', description='-'),
        resourceGroupName?: string(name='ResourceGroupName', example='exampleResourceGroup'),
        responseParamList?: [ 
          {
            dateFormat?: string(name='DateFormat', example='yyyy-MM-dd'),
            defaultValue?: string(name='DefaultValue', example='default_response_value'),
            description?: string(name='Description', example='这是一个示例响应参数'),
            descriptionCode?: string(name='DescriptionCode', example='CODE_002'),
            id?: long(name='Id', example='2001'),
            initialValue?: string(name='InitialValue', example='app_key_value'),
            mappingColumn?: string(name='MappingColumn', example='responseColumn1'),
            must?: long(name='Must', example='1'),
            operator?: string(name='Operator', example='='),
            optional?: long(name='Optional', example='1'),
            originalColumn?: string(name='OriginalColumn', example='original_response_column'),
            paramName?: string(name='ParamName', example='responseParam1'),
            paramType?: string(name='ParamType', example='String'),
            parameterLocation?: string(name='ParameterLocation', example='/path/to/response_param'),
            sample?: string(name='Sample', example='responseValue1'),
            tableAndDsList?: [ 
              {
                datasourceId?: string(name='DatasourceId', example='ds67890'),
                datasourceName?: string(name='DatasourceName', example='responseDatasource'),
                datasourceType?: long(name='DatasourceType', example='2'),
                datasourceUrl?: string(name='DatasourceUrl', example='https://example.com/response_datasource'),
                tableName?: string(name='TableName', example='response_table'),
              }
            ](name='TableAndDsList', description='-'),
          }
        ](name='ResponseParamList', description='-'),
        resultSample?: string(name='ResultSample', example='{"status":"success","data":[]}'),
        returnType?: long(name='ReturnType', example='3'),
        returnTypeName?: string(name='ReturnTypeName', example='JSON'),
        rsGrpId?: string(name='RsGrpId', example='grp12345'),
        scriptType?: string(name='ScriptType', example='SQL'),
        specialSql?: long(name='SpecialSql', example='0'),
        sqlStatement?: string(name='SqlStatement', example='SELECT * FROM example_table'),
        tableName?: string(name='TableName', example='exampleTable'),
        timeout?: string(name='Timeout', example='10'),
        updateRate?: long(name='UpdateRate', example='2'),
        updateRateName?: string(name='UpdateRateName', example='每日更新'),
        version?: string(name='Version', example='v1.0'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ListResult'),
  message?: string(name='Message', example='internal error'),
  requestId?: string(name='RequestId', description='Id of the request', example='82E78D6B-AA8F-1FEF-8AA3-5C9DA2A79140'),
  success?: boolean(name='Success', example='true'),
}

model ListApiByAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApiByAppResponseBody(name='body'),
}

/**
 * @summary 根据app查询api列表
 *
 * @param tmpReq ListApiByAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApiByAppResponse
 */
async function listApiByAppWithOptions(tmpReq: ListApiByAppRequest, runtime: $RuntimeOptions): ListApiByAppResponse {
  tmpReq.validate();
  var request = new ListApiByAppShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.pageQuery)) {
    request.pageQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.pageQuery, 'PageQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.pageQueryShrink)) {
    body['PageQuery'] = request.pageQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApiByApp',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据app查询api列表
 *
 * @param request ListApiByAppRequest
 * @return ListApiByAppResponse
 */
async function listApiByApp(request: ListApiByAppRequest): ListApiByAppResponse {
  var runtime = new $RuntimeOptions{};
  return listApiByAppWithOptions(request, runtime);
}

model ListAuthorizedDataServiceApiDetailsRequest {
  listQuery?: {
    appKey?: long(name='AppKey', description='AppKey

This parameter is required.', example='200000000'),
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAuthorizedDataServiceApiDetailsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListAuthorizedDataServiceApiDetailsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='非法入参'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  result?: {
    data?: [ 
      {
        apiId?: long(name='ApiId', description='API_ID', example='12345'),
        apiName?: string(name='ApiName', example='GetData'),
        appId?: long(name='AppId', example='12345'),
        authType?: string(name='AuthType', example='使用权限'),
        authorizedDevReturnParameters?: [ 
          {
            exampleValue?: string(name='ExampleValue', example='example1'),
            isAuthorized?: int32(name='IsAuthorized', example='1'),
            parameterDataType?: int32(name='ParameterDataType', example='0'),
            parameterDescription?: string(name='ParameterDescription', example='description1'),
            parameterName?: string(name='ParameterName', example='param1'),
          }
        ](name='AuthorizedDevReturnParameters'),
        authorizedProdReturnParameters?: [ 
          {
            exampleValue?: string(name='ExampleValue', example='example1'),
            isAuthorized?: int32(name='IsAuthorized', example='1'),
            parameterDataType?: int32(name='ParameterDataType', example='0'),
            parameterDescription?: string(name='ParameterDescription', example='description1'),
            parameterName?: string(name='ParameterName', example='param1'),
          }
        ](name='AuthorizedProdReturnParameters'),
        description?: string(name='Description', example='Description1'),
        devAuthPeriod?: string(name='DevAuthPeriod', example='2035-12-31'),
        prodAuthPeriod?: string(name='ProdAuthPeriod', example='2035-12-31'),
        projectId?: long(name='ProjectId', example='10000'),
      }
    ](name='Data'),
    totalCount?: long(name='TotalCount', example='100'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model ListAuthorizedDataServiceApiDetailsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAuthorizedDataServiceApiDetailsResponseBody(name='body'),
}

/**
 * @summary 查询应用已申请的API的具体的字段列表
 *
 * @param tmpReq ListAuthorizedDataServiceApiDetailsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAuthorizedDataServiceApiDetailsResponse
 */
async function listAuthorizedDataServiceApiDetailsWithOptions(tmpReq: ListAuthorizedDataServiceApiDetailsRequest, runtime: $RuntimeOptions): ListAuthorizedDataServiceApiDetailsResponse {
  tmpReq.validate();
  var request = new ListAuthorizedDataServiceApiDetailsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListAuthorizedDataServiceApiDetails',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询应用已申请的API的具体的字段列表
 *
 * @param request ListAuthorizedDataServiceApiDetailsRequest
 * @return ListAuthorizedDataServiceApiDetailsResponse
 */
async function listAuthorizedDataServiceApiDetails(request: ListAuthorizedDataServiceApiDetailsRequest): ListAuthorizedDataServiceApiDetailsResponse {
  var runtime = new $RuntimeOptions{};
  return listAuthorizedDataServiceApiDetailsWithOptions(request, runtime);
}

model ListBizEntitiesRequest {
  listQuery?: {
    filterCriteria?: {
      bizUnitIdList?: [ long ](name='BizUnitIdList'),
      bizUnitNameList?: [ string ](name='BizUnitNameList'),
      dataDomainIdList?: [ long ](name='DataDomainIdList'),
      dataDomainNameList?: [ string ](name='DataDomainNameList'),
      hasTableRef?: boolean(name='HasTableRef'),
      ownerUserIdList?: [ string ](name='OwnerUserIdList'),
      statusList?: [ string ](name='StatusList'),
      subTypeList?: [ string ](name='SubTypeList'),
    }(name='FilterCriteria'),
    keyword?: string(name='Keyword', example='object_'),
    page?: int32(name='Page', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListBizEntitiesShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListBizEntitiesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    bizEntityList?: [ 
      {
        belongToBizEntityIdList?: [ long ](name='BelongToBizEntityIdList'),
        bizUnitId?: long(name='BizUnitId', example='6798087749072704'),
        childBizEntityIdList?: [ long ](name='ChildBizEntityIdList'),
        dataDomainId?: long(name='DataDomainId', example='20101011'),
        description?: string(name='Description', example='test'),
        displayName?: string(name='DisplayName', example='业务活动测试'),
        gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
        gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
        hasChildBizEntity?: boolean(name='HasChildBizEntity'),
        id?: long(name='Id', example='12121111'),
        lastModifier?: string(name='LastModifier', example='30010010'),
        lastModifierName?: string(name='LastModifierName', example='张三'),
        levelSubBizObject?: boolean(name='LevelSubBizObject'),
        name?: string(name='Name', example='create_process_code_name'),
        onlineStatus?: string(name='OnlineStatus', example='SUBMITTED'),
        ownerName?: string(name='OwnerName', example='张三'),
        ownerUserId?: string(name='OwnerUserId', example='30010010'),
        refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
        refTableCount?: int32(name='RefTableCount', example='1'),
        status?: string(name='Status', example='SUBMITTED'),
        subType?: string(name='SubType', example='NORMAL'),
        suffixBizEntityIdList?: [ long ](name='SuffixBizEntityIdList'),
        type?: string(name='Type', example='BIZ_OBJECT'),
      }
    ](name='BizEntityList'),
    totalCount?: int32(name='TotalCount', example='66'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListBizEntitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListBizEntitiesResponseBody(name='body'),
}

/**
 * @summary 查询业务实体列表。
 *
 * @param tmpReq ListBizEntitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListBizEntitiesResponse
 */
async function listBizEntitiesWithOptions(tmpReq: ListBizEntitiesRequest, runtime: $RuntimeOptions): ListBizEntitiesResponse {
  tmpReq.validate();
  var request = new ListBizEntitiesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListBizEntities',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询业务实体列表。
 *
 * @param request ListBizEntitiesRequest
 * @return ListBizEntitiesResponse
 */
async function listBizEntities(request: ListBizEntitiesRequest): ListBizEntitiesResponse {
  var runtime = new $RuntimeOptions{};
  return listBizEntitiesWithOptions(request, runtime);
}

model ListBizUnitsRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListBizUnitsResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    bizUnitList?: [ 
      {
        accountList?: [ 
          {
            id?: string(name='Id', example='20001201'),
          }
        ](name='AccountList'),
        description?: string(name='Description', example='test'),
        displayName?: string(name='DisplayName', example='测试'),
        env?: string(name='Env', example='DEV'),
        gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
        gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
        icon?: string(name='Icon', example='icon-e-commerce'),
        id?: long(name='Id', example='101001201'),
        lastModifier?: string(name='LastModifier', example='30010010'),
        lastModifierName?: string(name='LastModifierName', example='张三'),
        mode?: string(name='Mode', example='DEV_PROD'),
        name?: string(name='Name', example='test01'),
        ownerName?: string(name='OwnerName', example='张三'),
        ownerUserId?: string(name='OwnerUserId', example='30010010'),
      }
    ](name='BizUnitList'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListBizUnitsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListBizUnitsResponseBody(name='body'),
}

/**
 * @summary 获取当前租户下的所有数据板块
 *
 * @param request ListBizUnitsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListBizUnitsResponse
 */
async function listBizUnitsWithOptions(request: ListBizUnitsRequest, runtime: $RuntimeOptions): ListBizUnitsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListBizUnits',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取当前租户下的所有数据板块
 *
 * @param request ListBizUnitsRequest
 * @return ListBizUnitsResponse
 */
async function listBizUnits(request: ListBizUnitsRequest): ListBizUnitsResponse {
  var runtime = new $RuntimeOptions{};
  return listBizUnitsWithOptions(request, runtime);
}

model ListDataDomainsRequest {
  listQuery?: {
    bizUnitIdList?: [ long ](name='BizUnitIdList'),
    keyword?: string(name='Keyword', example='test'),
    parentIdList?: [ long ](name='ParentIdList'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListDataDomainsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListDataDomainsResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    dataDomainList?: [ 
      {
        abbreviation?: string(name='Abbreviation', example='dm_code_name'),
        bizUnitId?: long(name='BizUnitId', example='545844456'),
        description?: string(name='Description', example='test'),
        displayName?: string(name='DisplayName', example='测试'),
        gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
        gmtModified?: string(name='GmtModified', example='2024-10-10 10:00:00'),
        id?: long(name='Id', example='1241844456'),
        lastModifier?: string(name='LastModifier', example='30010010'),
        lastModifierName?: string(name='LastModifierName', example='张三'),
        name?: string(name='Name', example='dm_code_name'),
        ownerName?: string(name='OwnerName', example='张三'),
        ownerUserId?: string(name='OwnerUserId', example='30010010'),
        parentId?: long(name='ParentId', example='10232311'),
      }
    ](name='DataDomainList'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListDataDomainsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDataDomainsResponseBody(name='body'),
}

/**
 * @summary 获取主题域列表。
 *
 * @param tmpReq ListDataDomainsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDataDomainsResponse
 */
async function listDataDomainsWithOptions(tmpReq: ListDataDomainsRequest, runtime: $RuntimeOptions): ListDataDomainsResponse {
  tmpReq.validate();
  var request = new ListDataDomainsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListDataDomains',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取主题域列表。
 *
 * @param request ListDataDomainsRequest
 * @return ListDataDomainsResponse
 */
async function listDataDomains(request: ListDataDomainsRequest): ListDataDomainsResponse {
  var runtime = new $RuntimeOptions{};
  return listDataDomainsWithOptions(request, runtime);
}

model ListDataSourceWithConfigRequest {
  listQuery?: {
    name?: string(name='Name', example='vcns-test'),
    ownerList?: [ string ](name='OwnerList'),
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
    scopeList?: [ string ](name='ScopeList'),
    tag?: string(name='Tag'),
    typeList?: [ string ](name='TypeList'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListDataSourceWithConfigShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListDataSourceWithConfigResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    dataSourceList?: [ 
      {
        devDataSourceInfo?: {
          configItemList?: [ 
            {
              key?: string(name='Key', example='param1'),
              value?: string(name='Value', example='value1'),
            }
          ](name='ConfigItemList'),
          createTime?: long(name='CreateTime', example='1710209552704'),
          creator?: string(name='Creator', example='212211111'),
          creatorName?: string(name='CreatorName'),
          description?: string(name='Description'),
          env?: string(name='Env', example='DEV'),
          id?: long(name='Id', example='12313123131'),
          modifyTime?: long(name='ModifyTime', example='1710209552704'),
          name?: string(name='Name'),
          owner?: string(name='Owner', example='212211111'),
          ownerName?: string(name='OwnerName'),
          scope?: string(name='Scope', example='ALL'),
          type?: string(name='Type', example='MAX_COMPUTE'),
        }(name='DevDataSourceInfo', description='开发环境数据源信息'),
        prodDataSourceInfo?: {
          configItemList?: [ 
            {
              key?: string(name='Key', example='param1'),
              value?: string(name='Value', example='value1'),
            }
          ](name='ConfigItemList'),
          createTime?: long(name='CreateTime', example='1708303959000'),
          creator?: string(name='Creator', example='212211111'),
          creatorName?: string(name='CreatorName'),
          description?: string(name='Description'),
          env?: string(name='Env', example='PROD'),
          id?: long(name='Id', example='300000028799'),
          modifyTime?: long(name='ModifyTime', example='1708303959000'),
          name?: string(name='Name'),
          owner?: string(name='Owner', example='212211111'),
          ownerName?: string(name='OwnerName'),
          scope?: string(name='Scope', example='ALL'),
          type?: string(name='Type', example='MAX_COMPUTE'),
        }(name='ProdDataSourceInfo', description='生产环境数据源'),
      }
    ](name='DataSourceList'),
    totalCount?: long(name='TotalCount', example='39'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListDataSourceWithConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDataSourceWithConfigResponseBody(name='body'),
}

/**
 * @summary 搜索数据源，所属结果包含数据源配置项
 *
 * @param tmpReq ListDataSourceWithConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDataSourceWithConfigResponse
 */
async function listDataSourceWithConfigWithOptions(tmpReq: ListDataSourceWithConfigRequest, runtime: $RuntimeOptions): ListDataSourceWithConfigResponse {
  tmpReq.validate();
  var request = new ListDataSourceWithConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListDataSourceWithConfig',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 搜索数据源，所属结果包含数据源配置项
 *
 * @param request ListDataSourceWithConfigRequest
 * @return ListDataSourceWithConfigResponse
 */
async function listDataSourceWithConfig(request: ListDataSourceWithConfigRequest): ListDataSourceWithConfigResponse {
  var runtime = new $RuntimeOptions{};
  return listDataSourceWithConfigWithOptions(request, runtime);
}

model ListFilesRequest {
  listQuery?: {
    category?: string(name='Category', description='This parameter is required.', example='tempCode'),
    directory?: string(name='Directory', description='This parameter is required.', example='/xx/x'),
    env?: string(name='Env', description='This parameter is required.', example='DEV'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='11112311'),
    recursive?: boolean(name='Recursive', description='This parameter is required.', example='true'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListFilesShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListFilesResponseBody = {
  code?: string(name='Code', example='OK'),
  fileList?: [ 
    {
      category?: string(name='Category', example='tempCode'),
      content?: string(name='Content', example='select 1;'),
      creator?: string(name='Creator', example='1212111'),
      directory?: string(name='Directory', example='/xx/x'),
      fileType?: string(name='FileType', example='directory'),
      gmtCreate?: long(name='GmtCreate', example='1717483193830'),
      gmtModified?: long(name='GmtModified', example='1717483193830'),
      id?: long(name='Id', example='111231112'),
      lastModifier?: string(name='LastModifier', example='1212111'),
      name?: string(name='Name', example='xx测试'),
      projectId?: long(name='ProjectId', example='312112121'),
    }
  ](name='FileList'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListFilesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFilesResponseBody(name='body'),
}

/**
 * @summary 遍历菜单树目录文件。
 *
 * @param tmpReq ListFilesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFilesResponse
 */
async function listFilesWithOptions(tmpReq: ListFilesRequest, runtime: $RuntimeOptions): ListFilesResponse {
  tmpReq.validate();
  var request = new ListFilesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListFiles',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 遍历菜单树目录文件。
 *
 * @param request ListFilesRequest
 * @return ListFilesResponse
 */
async function listFiles(request: ListFilesRequest): ListFilesResponse {
  var runtime = new $RuntimeOptions{};
  return listFilesWithOptions(request, runtime);
}

model ListInstancesRequest {
  env?: string(name='Env', example='PROD'),
  listQuery?: {
    bizType?: string(name='BizType', example='SCRIPT'),
    bizUnitId?: long(name='BizUnitId'),
    maxBizDate?: string(name='MaxBizDate', example='2024-05-31'),
    maxRunDate?: string(name='MaxRunDate', example='2024-05-31'),
    minBizDate?: string(name='MinBizDate', example='2024-05-30'),
    minRunDate?: string(name='MinRunDate', example='2024-05-30'),
    nodeId?: string(name='NodeId', example='n_23131'),
    ownerList?: [ string ](name='OwnerList'),
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
    priorityList?: [ string ](name='PriorityList'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='131311111321'),
    runStatusList?: [ string ](name='RunStatusList'),
    schedulePaused?: boolean(name='SchedulePaused'),
    schedulePeriodList?: [ string ](name='SchedulePeriodList'),
    scheduleType?: string(name='ScheduleType', description='This parameter is required.', example='NORMAL'),
    searchText?: string(name='SearchText', example='xx'),
    subBizTypeList?: [ string ](name='SubBizTypeList'),
  }(name='ListQuery'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListInstancesShrinkRequest {
  env?: string(name='Env', example='PROD'),
  listQueryShrink?: string(name='ListQuery'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListInstancesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    data?: [ 
      {
        bizDate?: string(name='BizDate', example='2024-05-30'),
        dueTime?: string(name='DueTime', example='2024-05-30 16:47:13'),
        duration?: string(name='Duration', example='60s'),
        endExecuteTime?: long(name='EndExecuteTime', example='2024-05-30 16:47:13'),
        extendInfo?: string(name='ExtendInfo', example='xx'),
        id?: string(name='Id', example='t_23231'),
        index?: int32(name='Index', example='1'),
        nodeInfo?: {
          bizUnitName?: string(name='BizUnitName'),
          createTime?: string(name='CreateTime', example='2024-05-30 16:47:13'),
          creator?: {
            id?: string(name='Id', example='21313112'),
            name?: string(name='Name'),
          }(name='Creator'),
          description?: string(name='Description'),
          dryRun?: boolean(name='DryRun', example='false'),
          from?: string(name='From', example='DATA_PROCES'),
          hasDev?: boolean(name='HasDev', example='false'),
          hasProd?: boolean(name='HasProd', example='true'),
          id?: string(name='Id', example='n_132331'),
          lastModifiedTime?: string(name='LastModifiedTime', example='2024-05-30 16:47:13'),
          modifier?: {
            id?: string(name='Id', example='21313112'),
            name?: string(name='Name'),
          }(name='Modifier'),
          name?: string(name='Name'),
          ownerList?: [ 
            {
              id?: string(name='Id', example='21313112'),
              name?: string(name='Name'),
            }
          ](name='OwnerList'),
          priorityList?: [ string ](name='PriorityList'),
          resourceGroupList?: [ string ](name='ResourceGroupList'),
          schedulePaused?: boolean(name='SchedulePaused', example='false'),
          schedulePeriodList?: [ string ](name='SchedulePeriodList'),
          subDetailType?: string(name='SubDetailType', example='SHELL'),
          type?: string(name='Type', example='DATA_PROCES'),
        }(name='NodeInfo'),
        startExecuteTime?: long(name='StartExecuteTime', example='2024-05-30 16:46:13'),
        statusList?: [ string ](name='StatusList'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='107'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListInstancesResponseBody(name='body'),
}

/**
 * @summary 分页查询实例。
 *
 * @param tmpReq ListInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListInstancesResponse
 */
async function listInstancesWithOptions(tmpReq: ListInstancesRequest, runtime: $RuntimeOptions): ListInstancesResponse {
  tmpReq.validate();
  var request = new ListInstancesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListInstances',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页查询实例。
 *
 * @param request ListInstancesRequest
 * @return ListInstancesResponse
 */
async function listInstances(request: ListInstancesRequest): ListInstancesResponse {
  var runtime = new $RuntimeOptions{};
  return listInstancesWithOptions(request, runtime);
}

model ListNodeDownStreamRequest {
  env?: string(name='Env', example='PROD'),
  listQuery?: {
    downStreamDepth?: int32(name='DownStreamDepth', example='1'),
    filterList?: [ 
      {
        exclude?: boolean(name='Exclude', example='false'),
        key?: string(name='Key', example='PROJECT'),
        valueList?: [ string ](name='ValueList'),
      }
    ](name='FilterList'),
    nodeIdList?: [ 
      {
        fieldIdList?: [ string ](name='FieldIdList', example='112'),
        id?: string(name='Id', example='n_23431'),
      }
    ](name='NodeIdList', description='This parameter is required.'),
    projectId?: long(name='ProjectId', example='123011'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListNodeDownStreamShrinkRequest {
  env?: string(name='Env', example='PROD'),
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListNodeDownStreamResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  nodeInfoList?: [ 
    {
      depth?: int32(name='Depth', example='1'),
      fieldIdList?: [ string ](name='FieldIdList'),
      id?: string(name='Id', example='n_2423351'),
      name?: string(name='Name'),
      type?: string(name='Type', example='DATA_PROCESS'),
    }
  ](name='NodeInfoList'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListNodeDownStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListNodeDownStreamResponseBody(name='body'),
}

/**
 * @summary 查询节点下游，创建补数据工作流时可以作为数据参考
 *
 * @param tmpReq ListNodeDownStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListNodeDownStreamResponse
 */
async function listNodeDownStreamWithOptions(tmpReq: ListNodeDownStreamRequest, runtime: $RuntimeOptions): ListNodeDownStreamResponse {
  tmpReq.validate();
  var request = new ListNodeDownStreamShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListNodeDownStream',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询节点下游，创建补数据工作流时可以作为数据参考
 *
 * @param request ListNodeDownStreamRequest
 * @return ListNodeDownStreamResponse
 */
async function listNodeDownStream(request: ListNodeDownStreamRequest): ListNodeDownStreamResponse {
  var runtime = new $RuntimeOptions{};
  return listNodeDownStreamWithOptions(request, runtime);
}

model ListNodesRequest {
  env?: string(name='Env', example='PROD'),
  listQuery?: {
    dryRun?: boolean(name='DryRun', example='false'),
    nodeBizType?: string(name='NodeBizType', description='This parameter is required.', example='SCRIPT'),
    nodeSubBizTypeList?: [ string ](name='NodeSubBizTypeList', description='This parameter is required.'),
    ownerList?: [ string ](name='OwnerList'),
    page?: int32(name='Page', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    priorityList?: [ string ](name='PriorityList'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='12111'),
    schedulePaused?: boolean(name='SchedulePaused', example='true'),
    schedulePeriodList?: [ string ](name='SchedulePeriodList'),
    scheduleType?: string(name='ScheduleType', example='NORMAL'),
    searchText?: string(name='SearchText', example='xx'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListNodesShrinkRequest {
  env?: string(name='Env', example='PROD'),
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListNodesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    nodeList?: [ 
      {
        bizUnitName?: string(name='BizUnitName'),
        createTime?: string(name='CreateTime', example='2024-05-30 16:47:13'),
        creator?: {
          id?: string(name='Id', example='23222'),
          name?: string(name='Name'),
        }(name='Creator'),
        description?: string(name='Description', example='xx test'),
        dryRun?: boolean(name='DryRun', example='true'),
        extendInfo?: string(name='ExtendInfo', example='{"xx":"zz"}'),
        from?: string(name='From', example='DATA_PROCESS'),
        hasDev?: boolean(name='HasDev', example='true'),
        hasProd?: boolean(name='HasProd', example='true'),
        id?: string(name='Id', example='n_31111'),
        lastModifiedTime?: string(name='LastModifiedTime', example='2024-05-30 16:47:13'),
        modifier?: {
          id?: string(name='Id', example='311131'),
          name?: string(name='Name'),
        }(name='Modifier'),
        name?: string(name='Name'),
        ownerList?: [ 
          {
            id?: string(name='Id', example='23222'),
            name?: string(name='Name'),
          }
        ](name='OwnerList'),
        priorityList?: [ string ](name='PriorityList'),
        projectInfo?: {
          id?: string(name='Id', example='1121321'),
          name?: string(name='Name'),
        }(name='ProjectInfo'),
        schedulePaused?: boolean(name='SchedulePaused', example='true'),
        schedulePeriodList?: [ string ](name='SchedulePeriodList'),
        subDetailType?: string(name='SubDetailType', example='SHELL'),
        type?: string(name='Type', example='DATA_PROCESS'),
      }
    ](name='NodeList'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListNodesResponseBody(name='body'),
}

/**
 * @summary 查询调度节点列表。
 *
 * @param tmpReq ListNodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListNodesResponse
 */
async function listNodesWithOptions(tmpReq: ListNodesRequest, runtime: $RuntimeOptions): ListNodesResponse {
  tmpReq.validate();
  var request = new ListNodesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListNodes',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询调度节点列表。
 *
 * @param request ListNodesRequest
 * @return ListNodesResponse
 */
async function listNodes(request: ListNodesRequest): ListNodesResponse {
  var runtime = new $RuntimeOptions{};
  return listNodesWithOptions(request, runtime);
}

model ListPublishRecordsRequest {
  listQuery?: {
    keyword?: string(name='Keyword', example='abc'),
    searchFilter?: {
      changeTypeList?: [ int32 ](name='ChangeTypeList'),
      page?: int32(name='Page', description='This parameter is required.', example='1'),
      pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
      projectIdList?: [ long ](name='ProjectIdList', description='This parameter is required.'),
      publishEndTime?: string(name='PublishEndTime', example='2024-10-10 10:00:00'),
      publishStartTime?: string(name='PublishStartTime', example='2024-10-10 10:00:00'),
      publishStatusList?: [ int32 ](name='PublishStatusList'),
      submitterList?: [ string ](name='SubmitterList'),
    }(name='SearchFilter', description='This parameter is required.'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListPublishRecordsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListPublishRecordsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  listResult?: {
    data?: [ 
      {
        changeType?: int32(name='ChangeType', example='0'),
        errorMessage?: string(name='ErrorMessage', example='error'),
        finishTime?: string(name='FinishTime', example='2024-10-10 10:10:10'),
        gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
        gmtModify?: string(name='GmtModify', example='2024-10-10 10:00:00'),
        id?: long(name='Id', example='1241844456'),
        nodeId?: string(name='NodeId', example='n_123456'),
        objectId?: string(name='ObjectId', example='1234567'),
        objectName?: string(name='ObjectName', example='对象A'),
        objectType?: string(name='ObjectType', example='2024-10-10 10:00:00'),
        objectVersion?: string(name='ObjectVersion', example='1'),
        projectId?: string(name='ProjectId', example='1241844456'),
        publishName?: string(name='PublishName', example='test_lc__20241118171502'),
        publishStatus?: int32(name='PublishStatus', example='1'),
        publisher?: string(name='Publisher', example='307999999'),
        publisherName?: string(name='PublisherName', example='张三'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ListResult'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListPublishRecordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublishRecordsResponseBody(name='body'),
}

/**
 * @summary 分页获取发布记录列表
 *
 * @param tmpReq ListPublishRecordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublishRecordsResponse
 */
async function listPublishRecordsWithOptions(tmpReq: ListPublishRecordsRequest, runtime: $RuntimeOptions): ListPublishRecordsResponse {
  tmpReq.validate();
  var request = new ListPublishRecordsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPublishRecords',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页获取发布记录列表
 *
 * @param request ListPublishRecordsRequest
 * @return ListPublishRecordsResponse
 */
async function listPublishRecords(request: ListPublishRecordsRequest): ListPublishRecordsResponse {
  var runtime = new $RuntimeOptions{};
  return listPublishRecordsWithOptions(request, runtime);
}

model ListResourcePermissionOperationLogRequest {
  listQuery?: {
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
    searchText?: string(name='SearchText', example='xx测试'),
    tabType?: string(name='TabType', description='This parameter is required.', example='TABLE'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListResourcePermissionOperationLogShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListResourcePermissionOperationLogResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    data?: [ 
      {
        account?: {
          id?: string(name='Id', example='1212131'),
          name?: string(name='Name', example='xx'),
          type?: string(name='Type', example='PERSONAL'),
        }(name='Account'),
        authScope?: string(name='AuthScope', example='selectTable'),
        operateId?: long(name='OperateId', example='123133'),
        operateTime?: long(name='OperateTime', example='1710012121000'),
        operateType?: string(name='OperateType', example='APPLY'),
        period?: {
          endTime?: string(name='EndTime', example='1712000000000'),
          type?: string(name='Type', example='CUSTOM'),
        }(name='Period'),
        reason?: string(name='Reason', example='xx测试'),
        resourceInfo?: {
          bizUnitInfo?: {
            displayName?: string(name='DisplayName', example='xx'),
            env?: string(name='Env', example='DEV'),
            id?: string(name='Id', description='Id', example='121323'),
            name?: string(name='Name', example='xx'),
          }(name='BizUnitInfo'),
          displayName?: string(name='DisplayName', example='tb1'),
          env?: string(name='Env', example='DEV'),
          id?: string(name='Id', example='a.tb1'),
          name?: string(name='Name', example='tb1'),
          projectInfo?: {
            displayName?: string(name='DisplayName', example='xx'),
            env?: string(name='Env', example='DEV'),
            id?: long(name='Id', example='1123131'),
            name?: string(name='Name', example='xx'),
          }(name='ProjectInfo'),
          type?: string(name='Type', example='PHYSICAL_TABLE'),
        }(name='ResourceInfo'),
        targetAccount?: {
          id?: string(name='Id', example='1212131'),
          name?: string(name='Name', example='xx'),
          type?: string(name='Type', example='PERSONAL'),
        }(name='TargetAccount'),
      }
    ](name='Data'),
    totalCount?: long(name='TotalCount', example='121'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListResourcePermissionOperationLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListResourcePermissionOperationLogResponseBody(name='body'),
}

/**
 * @summary 分页获取权限操作列表
 *
 * @param tmpReq ListResourcePermissionOperationLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListResourcePermissionOperationLogResponse
 */
async function listResourcePermissionOperationLogWithOptions(tmpReq: ListResourcePermissionOperationLogRequest, runtime: $RuntimeOptions): ListResourcePermissionOperationLogResponse {
  tmpReq.validate();
  var request = new ListResourcePermissionOperationLogShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListResourcePermissionOperationLog',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页获取权限操作列表
 *
 * @param request ListResourcePermissionOperationLogRequest
 * @return ListResourcePermissionOperationLogResponse
 */
async function listResourcePermissionOperationLog(request: ListResourcePermissionOperationLogRequest): ListResourcePermissionOperationLogResponse {
  var runtime = new $RuntimeOptions{};
  return listResourcePermissionOperationLogWithOptions(request, runtime);
}

model ListResourcePermissionsRequest {
  listQuery?: {
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
    searchText?: string(name='SearchText', example='xx测试'),
    tabType?: string(name='TabType', description='This parameter is required.', example='TABLE'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListResourcePermissionsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListResourcePermissionsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    data?: [ 
      {
        authScope?: string(name='AuthScope', example='selectTable'),
        period?: {
          endTime?: string(name='EndTime', example='1712000000000'),
          type?: string(name='Type', example='CUSTOM'),
        }(name='Period'),
        permissionPeriodList?: [ 
          {
            period?: {
              endTime?: string(name='EndTime', example='1712000000000'),
              type?: string(name='Type', example='CUSTOM'),
            }(name='Period'),
            permissionType?: string(name='PermissionType', example='SELECT'),
          }
        ](name='PermissionPeriodList'),
        recordId?: string(name='RecordId', example='12123111'),
        resourceInfo?: {
          bizUnitInfo?: {
            displayName?: string(name='DisplayName', example='xx'),
            env?: string(name='Env', example='DEV'),
            id?: string(name='Id', description='Id', example='121323'),
            name?: string(name='Name', example='xx'),
          }(name='BizUnitInfo'),
          displayName?: string(name='DisplayName', example='tb1'),
          env?: string(name='Env', example='DEV'),
          id?: string(name='Id', example='a.tb1'),
          name?: string(name='Name', example='tb1'),
          projectInfo?: {
            displayName?: string(name='DisplayName', example='xx'),
            env?: string(name='Env', example='DEV'),
            id?: long(name='Id', example='1123131'),
            name?: string(name='Name', example='xx'),
          }(name='ProjectInfo'),
          type?: string(name='Type', example='PHYSICAL_TABLE'),
        }(name='ResourceInfo'),
        targetAccount?: {
          id?: string(name='Id', example='1212131'),
          name?: string(name='Name', example='xx'),
          type?: string(name='Type', example='PERSONAL'),
        }(name='TargetAccount'),
      }
    ](name='Data'),
    totalCount?: long(name='TotalCount', example='121'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListResourcePermissionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListResourcePermissionsResponseBody(name='body'),
}

/**
 * @summary 分页获取权限记录列表
 *
 * @param tmpReq ListResourcePermissionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListResourcePermissionsResponse
 */
async function listResourcePermissionsWithOptions(tmpReq: ListResourcePermissionsRequest, runtime: $RuntimeOptions): ListResourcePermissionsResponse {
  tmpReq.validate();
  var request = new ListResourcePermissionsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListResourcePermissions',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页获取权限记录列表
 *
 * @param request ListResourcePermissionsRequest
 * @return ListResourcePermissionsResponse
 */
async function listResourcePermissions(request: ListResourcePermissionsRequest): ListResourcePermissionsResponse {
  var runtime = new $RuntimeOptions{};
  return listResourcePermissionsWithOptions(request, runtime);
}

model ListRowPermissionRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  pageRowPermissionQuery?: {
    keyword?: string(name='Keyword'),
    pageNum?: int32(name='PageNum', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  }(name='PageRowPermissionQuery', description='This parameter is required.'),
}

model ListRowPermissionShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  pageRowPermissionQueryShrink?: string(name='PageRowPermissionQuery', description='This parameter is required.'),
}

model ListRowPermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    data?: [ 
      {
        creator?: string(name='Creator', example='30008888'),
        gmtCreate?: string(name='GmtCreate', example='2023-08-23T08:01:44Z'),
        gmtModified?: string(name='GmtModified', example='2025-02-12T02:16:45Z'),
        mappingColumns?: [ 
          {
            columnDesc?: string(name='ColumnDesc'),
            columnName?: string(name='ColumnName', example='business_id'),
            columnType?: string(name='ColumnType', example='string'),
          }
        ](name='MappingColumns'),
        modifier?: string(name='Modifier', example='30008888'),
        rowPermissionDesc?: string(name='RowPermissionDesc'),
        rowPermissionId?: long(name='RowPermissionId', example='30008888'),
        rowPermissionName?: string(name='RowPermissionName'),
        rules?: [ 
          {
            expressions?: [ 
              {
                mappingColumnName?: string(name='MappingColumnName', example='business_id'),
                operator?: string(name='Operator', example='30008888'),
                subConditions?: [ any ](name='SubConditions'),
                type?: string(name='Type', example='EXPRESSION'),
                values?: [ string ](name='Values'),
              }
            ](name='Expressions'),
            isDelete?: boolean(name='IsDelete'),
            ruleName?: string(name='RuleName'),
            scopeType?: string(name='ScopeType', example='SELECT_COLUMN'),
            status?: int32(name='Status', example='1'),
            userMappingList?: [ 
              {
                accountType?: string(name='AccountType', example='PERSONAL'),
                accounts?: [ 
                  {
                    accountId?: string(name='AccountId', example='30008888'),
                  }
                ](name='Accounts'),
              }
            ](name='UserMappingList'),
          }
        ](name='Rules'),
        tables?: [ 
          {
            columnName?: string(name='ColumnName', example='business_id'),
            mappingColumnName?: string(name='MappingColumnName', example='business_id'),
            resourceId?: string(name='ResourceId', example='odps.300199897.project_name.table_name'),
          }
        ](name='Tables'),
        tenantId?: long(name='TenantId', example='30000001'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='10'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListRowPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRowPermissionResponseBody(name='body'),
}

/**
 * @summary 分页查询行级权限
 *
 * @param tmpReq ListRowPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRowPermissionResponse
 */
async function listRowPermissionWithOptions(tmpReq: ListRowPermissionRequest, runtime: $RuntimeOptions): ListRowPermissionResponse {
  tmpReq.validate();
  var request = new ListRowPermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.pageRowPermissionQuery)) {
    request.pageRowPermissionQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.pageRowPermissionQuery, 'PageRowPermissionQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.pageRowPermissionQueryShrink)) {
    body['PageRowPermissionQuery'] = request.pageRowPermissionQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRowPermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页查询行级权限
 *
 * @param request ListRowPermissionRequest
 * @return ListRowPermissionResponse
 */
async function listRowPermission(request: ListRowPermissionRequest): ListRowPermissionResponse {
  var runtime = new $RuntimeOptions{};
  return listRowPermissionWithOptions(request, runtime);
}

model ListRowPermissionByUserIdRequest {
  listRowPermissionByUserIdQuery?: {
    operator?: string(name='Operator', description='This parameter is required.', example='30008888'),
    pageNum?: int32(name='PageNum', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  }(name='ListRowPermissionByUserIdQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListRowPermissionByUserIdShrinkRequest {
  listRowPermissionByUserIdQueryShrink?: string(name='ListRowPermissionByUserIdQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListRowPermissionByUserIdResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    data?: [ 
      {
        creator?: string(name='Creator', example='30008888'),
        gmtCreate?: string(name='GmtCreate', example='2023-03-30T21:37:23Z'),
        gmtModified?: string(name='GmtModified', example='2025-03-03T10:14Z'),
        modifier?: string(name='Modifier', example='30008888'),
        rules?: [ 
          {
            expressions?: [ 
              {
                mappingColumnName?: string(name='MappingColumnName', example='business_id'),
                operator?: string(name='Operator', example='EQUAL'),
                subConditions?: [ any ](name='SubConditions'),
                type?: string(name='Type', example='EXPRESSION'),
                values?: [ string ](name='Values'),
              }
            ](name='Expressions'),
            isDelete?: boolean(name='IsDelete', example='0'),
            ruleName?: string(name='RuleName'),
            scopeType?: string(name='ScopeType', example='SELECT_COLUMN'),
            status?: int32(name='Status', example='1'),
            userMappingList?: [ 
              {
                accountType?: string(name='AccountType', example='PERSONAL'),
                accounts?: [ 
                  {
                    accountId?: string(name='AccountId', example='30008888'),
                  }
                ](name='Accounts'),
              }
            ](name='UserMappingList'),
          }
        ](name='Rules'),
        tables?: [ 
          {
            columnName?: string(name='ColumnName', example='business_id'),
            mappingColumnName?: string(name='MappingColumnName'),
            resourceId?: string(name='ResourceId', example='odps.300199897.project_name.table_name'),
          }
        ](name='Tables'),
        tenantId?: long(name='TenantId', example='30000001'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='121'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListRowPermissionByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRowPermissionByUserIdResponseBody(name='body'),
}

/**
 * @summary 分页查询指定用户行级权限
 *
 * @param tmpReq ListRowPermissionByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRowPermissionByUserIdResponse
 */
async function listRowPermissionByUserIdWithOptions(tmpReq: ListRowPermissionByUserIdRequest, runtime: $RuntimeOptions): ListRowPermissionByUserIdResponse {
  tmpReq.validate();
  var request = new ListRowPermissionByUserIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listRowPermissionByUserIdQuery)) {
    request.listRowPermissionByUserIdQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listRowPermissionByUserIdQuery, 'ListRowPermissionByUserIdQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listRowPermissionByUserIdQueryShrink)) {
    body['ListRowPermissionByUserIdQuery'] = request.listRowPermissionByUserIdQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRowPermissionByUserId',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页查询指定用户行级权限
 *
 * @param request ListRowPermissionByUserIdRequest
 * @return ListRowPermissionByUserIdResponse
 */
async function listRowPermissionByUserId(request: ListRowPermissionByUserIdRequest): ListRowPermissionByUserIdResponse {
  var runtime = new $RuntimeOptions{};
  return listRowPermissionByUserIdWithOptions(request, runtime);
}

model ListSubmitRecordsRequest {
  listQuery?: {
    keyword?: string(name='Keyword', example='abc'),
    searchFilter?: {
      changeTypeList?: [ int32 ](name='ChangeTypeList'),
      page?: int32(name='Page', description='This parameter is required.', example='1'),
      pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
      projectIdList?: [ long ](name='ProjectIdList', description='This parameter is required.'),
      submitEndTime?: string(name='SubmitEndTime', example='2024-10-10 10:00:00'),
      submitStartTime?: string(name='SubmitStartTime', example='2024-10-10 10:00:00'),
      submitterList?: [ string ](name='SubmitterList'),
    }(name='SearchFilter', description='This parameter is required.'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListSubmitRecordsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListSubmitRecordsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  listResult?: {
    data?: [ 
      {
        changeType?: int32(name='ChangeType', example='0'),
        gmtCreate?: string(name='GmtCreate', example='2024-10-10 10:00:00'),
        gmtModify?: string(name='GmtModify', example='2024-10-10 10:00:00'),
        id?: long(name='Id', example='1241844456'),
        nodeId?: string(name='NodeId', example='n_123456'),
        objectId?: string(name='ObjectId', example='1234567'),
        objectName?: string(name='ObjectName', example='对象A'),
        objectType?: string(name='ObjectType', example='2024-10-10 10:00:00'),
        objectVersion?: string(name='ObjectVersion', example='1'),
        projectId?: string(name='ProjectId', example='1241844456'),
        submitComment?: string(name='SubmitComment', example='提交信息'),
        submitter?: string(name='Submitter', example='307999999'),
        submitterName?: string(name='SubmitterName', example='张三'),
      }
    ](name='Data'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='ListResult'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ListSubmitRecordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSubmitRecordsResponseBody(name='body'),
}

/**
 * @summary 分页获取待发布记录列表
 *
 * @param tmpReq ListSubmitRecordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSubmitRecordsResponse
 */
async function listSubmitRecordsWithOptions(tmpReq: ListSubmitRecordsRequest, runtime: $RuntimeOptions): ListSubmitRecordsResponse {
  tmpReq.validate();
  var request = new ListSubmitRecordsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListSubmitRecords',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页获取待发布记录列表
 *
 * @param request ListSubmitRecordsRequest
 * @return ListSubmitRecordsResponse
 */
async function listSubmitRecords(request: ListSubmitRecordsRequest): ListSubmitRecordsResponse {
  var runtime = new $RuntimeOptions{};
  return listSubmitRecordsWithOptions(request, runtime);
}

model ListTenantMembersRequest {
  listQuery?: {
    page?: int32(name='Page', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
    roleList?: [ string ](name='RoleList'),
    searchText?: string(name='SearchText'),
    userGroupIdList?: [ string ](name='UserGroupIdList'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListTenantMembersShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListTenantMembersResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    totalCount?: int32(name='TotalCount', example='110'),
    userList?: [ 
      {
        accountName?: string(name='AccountName', example='zhangsan'),
        dingNumber?: string(name='DingNumber', example='dd123123'),
        displayName?: string(name='DisplayName', example='zhangsan'),
        displayNameWithoutStatus?: string(name='DisplayNameWithoutStatus', example='zhangsan'),
        enableWhiteIp?: string(name='EnableWhiteIp', example='true'),
        gmtCreate?: long(name='GmtCreate', example='1730000000000'),
        gmtModified?: long(name='GmtModified', example='1730000000000'),
        id?: string(name='Id', example='132321'),
        mail?: string(name='Mail', example='123@aliyun.com'),
        mobilePhone?: string(name='MobilePhone', example='13888888888'),
        name?: string(name='Name', example='zhangsan'),
        nickName?: string(name='NickName', example='susan'),
        realName?: string(name='RealName'),
        roleList?: [ string ](name='RoleList'),
        sourceId?: string(name='SourceId', example='213213232422222'),
        sourceType?: string(name='SourceType', example='aliyun'),
        userGroupList?: [ 
          {
            active?: boolean(name='Active', example='true'),
            description?: string(name='Description'),
            id?: string(name='Id', example='121313'),
            name?: string(name='Name'),
          }
        ](name='UserGroupList'),
        whiteIp?: string(name='WhiteIp', example='0.0.0.0/0'),
      }
    ](name='UserList'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListTenantMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTenantMembersResponseBody(name='body'),
}

/**
 * @summary 查询租户成员列表
 *
 * @param tmpReq ListTenantMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTenantMembersResponse
 */
async function listTenantMembersWithOptions(tmpReq: ListTenantMembersRequest, runtime: $RuntimeOptions): ListTenantMembersResponse {
  tmpReq.validate();
  var request = new ListTenantMembersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListTenantMembers',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询租户成员列表
 *
 * @param request ListTenantMembersRequest
 * @return ListTenantMembersResponse
 */
async function listTenantMembers(request: ListTenantMembersRequest): ListTenantMembersResponse {
  var runtime = new $RuntimeOptions{};
  return listTenantMembersWithOptions(request, runtime);
}

model ListUserGroupMembersRequest {
  listQuery?: {
    keyword?: string(name='Keyword', example='a'),
    pageNo?: int32(name='PageNo', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
    userGroupId?: string(name='UserGroupId', example='232231'),
    userIdList?: [ string ](name='UserIdList'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListUserGroupMembersShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListUserGroupMembersResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    memberList?: [ 
      {
        creator?: {
          accountName?: string(name='AccountName', example='12121111'),
          displayName?: string(name='DisplayName', example='zhangsan'),
          id?: string(name='Id', example='12121111'),
        }(name='Creator'),
        gmtCreate?: long(name='GmtCreate', example='zhangsan'),
        id?: string(name='Id', example='2324211'),
        userGroupId?: string(name='UserGroupId', example='231111'),
        userInfo?: {
          accountName?: string(name='AccountName', example='atest'),
          displayName?: string(name='DisplayName'),
          id?: string(name='Id', example='13232'),
        }(name='UserInfo'),
        userRole?: string(name='UserRole', example='SECURITY_ADMIN'),
      }
    ](name='MemberList'),
    totalCount?: int32(name='TotalCount', example='217'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListUserGroupMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGroupMembersResponseBody(name='body'),
}

/**
 * @summary 用户组成员列表分页查询.
 *
 * @param tmpReq ListUserGroupMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGroupMembersResponse
 */
async function listUserGroupMembersWithOptions(tmpReq: ListUserGroupMembersRequest, runtime: $RuntimeOptions): ListUserGroupMembersResponse {
  tmpReq.validate();
  var request = new ListUserGroupMembersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserGroupMembers',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户组成员列表分页查询.
 *
 * @param request ListUserGroupMembersRequest
 * @return ListUserGroupMembersResponse
 */
async function listUserGroupMembers(request: ListUserGroupMembersRequest): ListUserGroupMembersResponse {
  var runtime = new $RuntimeOptions{};
  return listUserGroupMembersWithOptions(request, runtime);
}

model ListUserGroupsRequest {
  listQuery?: {
    active?: boolean(name='Active', example='true'),
    adminIdList?: [ string ](name='AdminIdList'),
    filterMine?: boolean(name='FilterMine', example='false'),
    keyword?: string(name='Keyword'),
    pageNo?: int32(name='PageNo', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  }(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListUserGroupsShrinkRequest {
  listQueryShrink?: string(name='ListQuery', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model ListUserGroupsResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  pageResult?: {
    totalCount?: int32(name='TotalCount', example='49'),
    userGroupList?: [ 
      {
        active?: boolean(name='Active', example='true'),
        adminList?: [ 
          {
            accountName?: string(name='AccountName', example='zhangsan'),
            displayName?: string(name='DisplayName'),
            id?: string(name='Id', example='32313131'),
          }
        ](name='AdminList'),
        description?: string(name='Description'),
        id?: string(name='Id', example='31313232'),
        myRole?: string(name='MyRole', example='SECURITY_ADMIN'),
        name?: string(name='Name'),
      }
    ](name='UserGroupList'),
  }(name='PageResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ListUserGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGroupsResponseBody(name='body'),
}

/**
 * @summary 用户组列表分页查询.
 *
 * @param tmpReq ListUserGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGroupsResponse
 */
async function listUserGroupsWithOptions(tmpReq: ListUserGroupsRequest, runtime: $RuntimeOptions): ListUserGroupsResponse {
  tmpReq.validate();
  var request = new ListUserGroupsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.listQuery)) {
    request.listQueryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.listQuery, 'ListQuery', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.listQueryShrink)) {
    body['ListQuery'] = request.listQueryShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserGroups',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户组列表分页查询.
 *
 * @param request ListUserGroupsRequest
 * @return ListUserGroupsResponse
 */
async function listUserGroups(request: ListUserGroupsRequest): ListUserGroupsResponse {
  var runtime = new $RuntimeOptions{};
  return listUserGroupsWithOptions(request, runtime);
}

model OfflineBatchTaskRequest {
  comment?: string(name='Comment', description='This parameter is required.', example='test xx'),
  fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
}

model OfflineBatchTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  offlineResult?: {
    publishObjectId?: long(name='PublishObjectId', example='10211123'),
  }(name='OfflineResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model OfflineBatchTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OfflineBatchTaskResponseBody(name='body'),
}

/**
 * @summary 下线离线计算任务。
 *
 * @param request OfflineBatchTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OfflineBatchTaskResponse
 */
async function offlineBatchTaskWithOptions(request: OfflineBatchTaskRequest, runtime: $RuntimeOptions): OfflineBatchTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.comment)) {
    query['Comment'] = request.comment;
  }
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'OfflineBatchTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下线离线计算任务。
 *
 * @param request OfflineBatchTaskRequest
 * @return OfflineBatchTaskResponse
 */
async function offlineBatchTask(request: OfflineBatchTaskRequest): OfflineBatchTaskResponse {
  var runtime = new $RuntimeOptions{};
  return offlineBatchTaskWithOptions(request, runtime);
}

model OfflineBizEntityRequest {
  offlineCommand?: {
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='6798087749072704'),
    comment?: string(name='Comment', description='This parameter is required.', example='test'),
    id?: long(name='Id', description='This parameter is required.', example='101001201'),
    type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
  }(name='OfflineCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model OfflineBizEntityShrinkRequest {
  offlineCommandShrink?: string(name='OfflineCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model OfflineBizEntityResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model OfflineBizEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OfflineBizEntityResponseBody(name='body'),
}

/**
 * @summary 下线业务实体、
 *
 * @param tmpReq OfflineBizEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OfflineBizEntityResponse
 */
async function offlineBizEntityWithOptions(tmpReq: OfflineBizEntityRequest, runtime: $RuntimeOptions): OfflineBizEntityResponse {
  tmpReq.validate();
  var request = new OfflineBizEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.offlineCommand)) {
    request.offlineCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.offlineCommand, 'OfflineCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.offlineCommandShrink)) {
    body['OfflineCommand'] = request.offlineCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'OfflineBizEntity',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下线业务实体、
 *
 * @param request OfflineBizEntityRequest
 * @return OfflineBizEntityResponse
 */
async function offlineBizEntity(request: OfflineBizEntityRequest): OfflineBizEntityResponse {
  var runtime = new $RuntimeOptions{};
  return offlineBizEntityWithOptions(request, runtime);
}

model OnlineBizEntityRequest {
  onlineCommand?: {
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='6798087749072704'),
    comment?: string(name='Comment', description='This parameter is required.', example='test'),
    id?: long(name='Id', description='This parameter is required.', example='101001201'),
    type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
  }(name='OnlineCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model OnlineBizEntityShrinkRequest {
  onlineCommandShrink?: string(name='OnlineCommand', description='This parameter is required.'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
}

model OnlineBizEntityResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model OnlineBizEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OnlineBizEntityResponseBody(name='body'),
}

/**
 * @summary 上线业务实体。
 *
 * @param tmpReq OnlineBizEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OnlineBizEntityResponse
 */
async function onlineBizEntityWithOptions(tmpReq: OnlineBizEntityRequest, runtime: $RuntimeOptions): OnlineBizEntityResponse {
  tmpReq.validate();
  var request = new OnlineBizEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.onlineCommand)) {
    request.onlineCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.onlineCommand, 'OnlineCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.onlineCommandShrink)) {
    body['OnlineCommand'] = request.onlineCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'OnlineBizEntity',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 上线业务实体。
 *
 * @param request OnlineBizEntityRequest
 * @return OnlineBizEntityResponse
 */
async function onlineBizEntity(request: OnlineBizEntityRequest): OnlineBizEntityResponse {
  var runtime = new $RuntimeOptions{};
  return onlineBizEntityWithOptions(request, runtime);
}

model OperateInstanceRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  operateCommand?: {
    instanceIdList?: [ 
      {
        fieldInstanceIdList?: [ string ](name='FieldInstanceIdList'),
        id?: string(name='Id', description='This parameter is required.', example='t_32111312'),
      }
    ](name='InstanceIdList', description='This parameter is required.'),
    operation?: string(name='Operation', description='This parameter is required.', example='RERUN'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='132311'),
  }(name='OperateCommand', description='This parameter is required.'),
}

model OperateInstanceShrinkRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  operateCommandShrink?: string(name='OperateCommand', description='This parameter is required.'),
}

model OperateInstanceResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  instanceStatusList?: [ 
    {
      displayName?: string(name='DisplayName'),
      errorMessage?: string(name='ErrorMessage', example='xx'),
      id?: string(name='Id', example='t_132435'),
      name?: string(name='Name'),
      ownerId?: string(name='OwnerId', example='121311'),
      ownerName?: string(name='OwnerName'),
      status?: string(name='Status', example='SUCCESS'),
    }
  ](name='InstanceStatusList'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model OperateInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OperateInstanceResponseBody(name='body'),
}

/**
 * @summary 运维实例。
 *
 * @param tmpReq OperateInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OperateInstanceResponse
 */
async function operateInstanceWithOptions(tmpReq: OperateInstanceRequest, runtime: $RuntimeOptions): OperateInstanceResponse {
  tmpReq.validate();
  var request = new OperateInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.operateCommand)) {
    request.operateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.operateCommand, 'OperateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.operateCommandShrink)) {
    body['OperateCommand'] = request.operateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'OperateInstance',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 运维实例。
 *
 * @param request OperateInstanceRequest
 * @return OperateInstanceResponse
 */
async function operateInstance(request: OperateInstanceRequest): OperateInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return operateInstanceWithOptions(request, runtime);
}

model ParseBatchTaskDependencyRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  parseCommand?: {
    code?: string(name='Code', description='This parameter is required.', example='select * from t_test limit 1;'),
    dataSourceCatalog?: string(name='DataSourceCatalog', example='mysql_catalog'),
    dataSourceId?: long(name='DataSourceId', example='12131111'),
    dataSourceSchema?: string(name='DataSourceSchema', example='erp'),
    includeAllInputTables?: boolean(name='IncludeAllInputTables'),
    needQueryLineages?: boolean(name='NeedQueryLineages'),
    operatorType?: string(name='OperatorType', description='This parameter is required.', example='MaxCompute_SQL'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  }(name='ParseCommand', description='This parameter is required.'),
}

model ParseBatchTaskDependencyShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  parseCommandShrink?: string(name='ParseCommand', description='This parameter is required.'),
}

model ParseBatchTaskDependencyResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  parseResult?: {
    dependNodeList?: [ 
      {
        nodeIoType?: string(name='NodeIoType', example='input'),
        scheduleNodeInfoList?: [ 
          {
            fieldList?: [ string ](name='FieldList'),
            nodeId?: string(name='NodeId', example='n_11013121'),
            nodeName?: string(name='NodeName', example='test11'),
            outputName?: string(name='OutputName', example='t_test'),
            ownerName?: string(name='OwnerName', example='张三'),
            ownerUserId?: string(name='OwnerUserId', example='201122301'),
            tableName?: string(name='TableName', example='t_test'),
          }
        ](name='ScheduleNodeInfoList'),
      }
    ](name='DependNodeList'),
  }(name='ParseResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model ParseBatchTaskDependencyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ParseBatchTaskDependencyResponseBody(name='body'),
}

/**
 * @summary 解析离线计算任务的逻辑表依赖，注意解析结果上游依赖信息中可能包含自依赖节点（上游节点ID和解析代码的任务节点ID相同）需要用户自己进行处理。
 *
 * @param tmpReq ParseBatchTaskDependencyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ParseBatchTaskDependencyResponse
 */
async function parseBatchTaskDependencyWithOptions(tmpReq: ParseBatchTaskDependencyRequest, runtime: $RuntimeOptions): ParseBatchTaskDependencyResponse {
  tmpReq.validate();
  var request = new ParseBatchTaskDependencyShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.parseCommand)) {
    request.parseCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parseCommand, 'ParseCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.parseCommandShrink)) {
    body['ParseCommand'] = request.parseCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ParseBatchTaskDependency',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解析离线计算任务的逻辑表依赖，注意解析结果上游依赖信息中可能包含自依赖节点（上游节点ID和解析代码的任务节点ID相同）需要用户自己进行处理。
 *
 * @param request ParseBatchTaskDependencyRequest
 * @return ParseBatchTaskDependencyResponse
 */
async function parseBatchTaskDependency(request: ParseBatchTaskDependencyRequest): ParseBatchTaskDependencyResponse {
  var runtime = new $RuntimeOptions{};
  return parseBatchTaskDependencyWithOptions(request, runtime);
}

model PausePhysicalNodeRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  pauseCommand?: {
    nodeIdList?: [ string ](name='NodeIdList', description='This parameter is required.'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='13222210'),
  }(name='PauseCommand', description='This parameter is required.'),
}

model PausePhysicalNodeShrinkRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  pauseCommandShrink?: string(name='PauseCommand', description='This parameter is required.'),
}

model PausePhysicalNodeResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  nodeOperateResultList?: [ 
    {
      errorMessage?: string(name='ErrorMessage', example='xx'),
      nodeId?: string(name='NodeId', example='n_123456'),
      status?: string(name='Status', example='SUCCESS'),
    }
  ](name='NodeOperateResultList'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model PausePhysicalNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PausePhysicalNodeResponseBody(name='body'),
}

/**
 * @summary 暂停物理节点调度。
 *
 * @param tmpReq PausePhysicalNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PausePhysicalNodeResponse
 */
async function pausePhysicalNodeWithOptions(tmpReq: PausePhysicalNodeRequest, runtime: $RuntimeOptions): PausePhysicalNodeResponse {
  tmpReq.validate();
  var request = new PausePhysicalNodeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.pauseCommand)) {
    request.pauseCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.pauseCommand, 'PauseCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.pauseCommandShrink)) {
    body['PauseCommand'] = request.pauseCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'PausePhysicalNode',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 暂停物理节点调度。
 *
 * @param request PausePhysicalNodeRequest
 * @return PausePhysicalNodeResponse
 */
async function pausePhysicalNode(request: PausePhysicalNodeRequest): PausePhysicalNodeResponse {
  var runtime = new $RuntimeOptions{};
  return pausePhysicalNodeWithOptions(request, runtime);
}

model PublishObjectListRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  publishCommand?: {
    comment?: string(name='Comment', description='This parameter is required.', example='发布'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='1234567'),
    submitIdList?: [ long ](name='SubmitIdList', description='This parameter is required.'),
  }(name='PublishCommand', description='This parameter is required.'),
}

model PublishObjectListShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  publishCommandShrink?: string(name='PublishCommand', description='This parameter is required.'),
}

model PublishObjectListResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  publishResult?: {
    submitIdList?: [ long ](name='SubmitIdList'),
  }(name='PublishResult'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model PublishObjectListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PublishObjectListResponseBody(name='body'),
}

/**
 * @summary 批量发布对象
 *
 * @param tmpReq PublishObjectListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PublishObjectListResponse
 */
async function publishObjectListWithOptions(tmpReq: PublishObjectListRequest, runtime: $RuntimeOptions): PublishObjectListResponse {
  tmpReq.validate();
  var request = new PublishObjectListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.publishCommand)) {
    request.publishCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.publishCommand, 'PublishCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.publishCommandShrink)) {
    body['PublishCommand'] = request.publishCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'PublishObjectList',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量发布对象
 *
 * @param request PublishObjectListRequest
 * @return PublishObjectListResponse
 */
async function publishObjectList(request: PublishObjectListRequest): PublishObjectListResponse {
  var runtime = new $RuntimeOptions{};
  return publishObjectListWithOptions(request, runtime);
}

model RemoveTenantMemberRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  removeCommand?: {
    sourceId?: string(name='SourceId', description='This parameter is required.', example='123@xx.com'),
  }(name='RemoveCommand', description='This parameter is required.'),
}

model RemoveTenantMemberShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  removeCommandShrink?: string(name='RemoveCommand', description='This parameter is required.'),
}

model RemoveTenantMemberResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model RemoveTenantMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveTenantMemberResponseBody(name='body'),
}

/**
 * @summary 删除租户成员
 *
 * @param tmpReq RemoveTenantMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveTenantMemberResponse
 */
async function removeTenantMemberWithOptions(tmpReq: RemoveTenantMemberRequest, runtime: $RuntimeOptions): RemoveTenantMemberResponse {
  tmpReq.validate();
  var request = new RemoveTenantMemberShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.removeCommand)) {
    request.removeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.removeCommand, 'RemoveCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.removeCommandShrink)) {
    body['RemoveCommand'] = request.removeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'RemoveTenantMember',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除租户成员
 *
 * @param request RemoveTenantMemberRequest
 * @return RemoveTenantMemberResponse
 */
async function removeTenantMember(request: RemoveTenantMemberRequest): RemoveTenantMemberResponse {
  var runtime = new $RuntimeOptions{};
  return removeTenantMemberWithOptions(request, runtime);
}

model RemoveUserGroupMemberRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  removeCommand?: {
    userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='2311'),
    userIdList?: [ string ](name='UserIdList', description='This parameter is required.'),
  }(name='RemoveCommand', description='This parameter is required.'),
}

model RemoveUserGroupMemberShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  removeCommandShrink?: string(name='RemoveCommand', description='This parameter is required.'),
}

model RemoveUserGroupMemberResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model RemoveUserGroupMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveUserGroupMemberResponseBody(name='body'),
}

/**
 * @summary 移除用户组成员.
 *
 * @param tmpReq RemoveUserGroupMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveUserGroupMemberResponse
 */
async function removeUserGroupMemberWithOptions(tmpReq: RemoveUserGroupMemberRequest, runtime: $RuntimeOptions): RemoveUserGroupMemberResponse {
  tmpReq.validate();
  var request = new RemoveUserGroupMemberShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.removeCommand)) {
    request.removeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.removeCommand, 'RemoveCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.removeCommandShrink)) {
    body['RemoveCommand'] = request.removeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'RemoveUserGroupMember',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 移除用户组成员.
 *
 * @param request RemoveUserGroupMemberRequest
 * @return RemoveUserGroupMemberResponse
 */
async function removeUserGroupMember(request: RemoveUserGroupMemberRequest): RemoveUserGroupMemberResponse {
  var runtime = new $RuntimeOptions{};
  return removeUserGroupMemberWithOptions(request, runtime);
}

model ResumePhysicalNodeRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  resumeCommand?: {
    nodeIdList?: [ string ](name='NodeIdList', description='This parameter is required.'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='102011'),
  }(name='ResumeCommand', description='This parameter is required.'),
}

model ResumePhysicalNodeShrinkRequest {
  env?: string(name='Env', example='PROD'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  resumeCommandShrink?: string(name='ResumeCommand', description='This parameter is required.'),
}

model ResumePhysicalNodeResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  nodeOperateResultList?: [ 
    {
      errorMessage?: string(name='ErrorMessage', example='xx'),
      nodeId?: string(name='NodeId', example='n_123456'),
      status?: string(name='Status', example='SUCCESS'),
    }
  ](name='NodeOperateResultList'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model ResumePhysicalNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResumePhysicalNodeResponseBody(name='body'),
}

/**
 * @summary 恢复物理节点调度。
 *
 * @param tmpReq ResumePhysicalNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumePhysicalNodeResponse
 */
async function resumePhysicalNodeWithOptions(tmpReq: ResumePhysicalNodeRequest, runtime: $RuntimeOptions): ResumePhysicalNodeResponse {
  tmpReq.validate();
  var request = new ResumePhysicalNodeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.resumeCommand)) {
    request.resumeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resumeCommand, 'ResumeCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.env)) {
    query['Env'] = request.env;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.resumeCommandShrink)) {
    body['ResumeCommand'] = request.resumeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ResumePhysicalNode',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 恢复物理节点调度。
 *
 * @param request ResumePhysicalNodeRequest
 * @return ResumePhysicalNodeResponse
 */
async function resumePhysicalNode(request: ResumePhysicalNodeRequest): ResumePhysicalNodeResponse {
  var runtime = new $RuntimeOptions{};
  return resumePhysicalNodeWithOptions(request, runtime);
}

model RevokeResourcePermissionRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  revokeCommand?: {
    operateList?: [ string ](name='OperateList'),
    reason?: string(name='Reason', example='xx'),
    resourceList?: [ 
      {
        resourceId?: string(name='ResourceId', example='odps.300002102.beginner_test.amin_table'),
      }
    ](name='ResourceList', description='This parameter is required.'),
    resourceType?: string(name='ResourceType', description='This parameter is required.', example='PHYSICAL_TABLE'),
    userId?: string(name='UserId', description='This parameter is required.', example='13131'),
  }(name='RevokeCommand', description='This parameter is required.'),
}

model RevokeResourcePermissionShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  revokeCommandShrink?: string(name='RevokeCommand', description='This parameter is required.'),
}

model RevokeResourcePermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model RevokeResourcePermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RevokeResourcePermissionResponseBody(name='body'),
}

/**
 * @summary 回收用户资源授权
 *
 * @param tmpReq RevokeResourcePermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RevokeResourcePermissionResponse
 */
async function revokeResourcePermissionWithOptions(tmpReq: RevokeResourcePermissionRequest, runtime: $RuntimeOptions): RevokeResourcePermissionResponse {
  tmpReq.validate();
  var request = new RevokeResourcePermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.revokeCommand)) {
    request.revokeCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.revokeCommand, 'RevokeCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.revokeCommandShrink)) {
    body['RevokeCommand'] = request.revokeCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'RevokeResourcePermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 回收用户资源授权
 *
 * @param request RevokeResourcePermissionRequest
 * @return RevokeResourcePermissionResponse
 */
async function revokeResourcePermission(request: RevokeResourcePermissionRequest): RevokeResourcePermissionResponse {
  var runtime = new $RuntimeOptions{};
  return revokeResourcePermissionWithOptions(request, runtime);
}

model StopAdHocTaskRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='MaxCompute_SQL_300000843_1611548758327'),
}

model StopAdHocTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model StopAdHocTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopAdHocTaskResponseBody(name='body'),
}

/**
 * @summary 终止即席查询任务。
 *
 * @param request StopAdHocTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopAdHocTaskResponse
 */
async function stopAdHocTaskWithOptions(request: StopAdHocTaskRequest, runtime: $RuntimeOptions): StopAdHocTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopAdHocTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 终止即席查询任务。
 *
 * @param request StopAdHocTaskRequest
 * @return StopAdHocTaskResponse
 */
async function stopAdHocTask(request: StopAdHocTaskRequest): StopAdHocTaskResponse {
  var runtime = new $RuntimeOptions{};
  return stopAdHocTaskWithOptions(request, runtime);
}

model SubmitBatchTaskRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  submitCommand?: {
    code?: string(name='Code', description='This parameter is required.', example='show tables;'),
    comment?: string(name='Comment', description='This parameter is required.', example='test'),
    cronExpression?: string(name='CronExpression', example='0 0 1 * * ?'),
    customScheduleConfig?: {
      endTime?: string(name='EndTime', description='This parameter is required.', example='10:00'),
      interval?: int32(name='Interval', description='This parameter is required.', example='1'),
      intervalUnit?: string(name='IntervalUnit', description='This parameter is required.', example='HOUR'),
      schedulePeriod?: string(name='SchedulePeriod', description='This parameter is required.', example='DAILY'),
      startTime?: string(name='StartTime', description='This parameter is required.', example='10:00'),
    }(name='CustomScheduleConfig'),
    engine?: string(name='Engine', example='PYTHON3_7'),
    fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
    name?: string(name='Name', description='This parameter is required.', example='test111'),
    nodeDescription?: string(name='NodeDescription', example='xx测试'),
    nodeOutputNameList?: [ string ](name='NodeOutputNameList'),
    nodeStatus?: int32(name='NodeStatus', example='1'),
    paramList?: [ 
      {
        key?: string(name='Key', description='This parameter is required.', example='key'),
        value?: string(name='Value', description='This parameter is required.', example='key'),
      }
    ](name='ParamList'),
    priority?: int32(name='Priority', example='1'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='10121101'),
    pythonModuleList?: [ string ](name='PythonModuleList'),
    schedulePeriod?: string(name='SchedulePeriod', example='DAILY'),
    sparkClientInfo?: {
      sparkClientVersion?: string(name='SparkClientVersion', description='This parameter is required.', example='abc'),
    }(name='SparkClientInfo'),
    upStreamList?: [ 
      {
        dependPeriod?: {
          periodOffset?: int32(name='PeriodOffset', example='1'),
          periodType?: string(name='PeriodType', description='This parameter is required.', example='CURRENT_PERIOD'),
        }(name='DependPeriod'),
        dependStrategy?: string(name='DependStrategy', example='ALL'),
        fieldList?: [ string ](name='FieldList'),
        nodeType?: string(name='NodeType', example='PHYSICAL'),
        periodDiff?: int32(name='PeriodDiff', description='This parameter is required.', example='1'),
        sourceNodeEnabled?: boolean(name='SourceNodeEnabled'),
        sourceNodeId?: string(name='SourceNodeId', example='n_2001'),
        sourceNodeOutputName?: string(name='SourceNodeOutputName', description='This parameter is required.', example='t_input1'),
        sourceTableName?: string(name='SourceTableName', example='t_input1'),
      }
    ](name='UpStreamList'),
  }(name='SubmitCommand', description='This parameter is required.'),
}

model SubmitBatchTaskShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  submitCommandShrink?: string(name='SubmitCommand', description='This parameter is required.'),
}

model SubmitBatchTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  submitResult?: {
    nodeId?: string(name='NodeId', example='n_12113111'),
    submitId?: long(name='SubmitId', example='1010312911'),
  }(name='SubmitResult'),
  success?: boolean(name='Success'),
}

model SubmitBatchTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitBatchTaskResponseBody(name='body'),
}

/**
 * @summary 提交离线计算任务。
 *
 * @param tmpReq SubmitBatchTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitBatchTaskResponse
 */
async function submitBatchTaskWithOptions(tmpReq: SubmitBatchTaskRequest, runtime: $RuntimeOptions): SubmitBatchTaskResponse {
  tmpReq.validate();
  var request = new SubmitBatchTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.submitCommand)) {
    request.submitCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.submitCommand, 'SubmitCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.submitCommandShrink)) {
    body['SubmitCommand'] = request.submitCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'SubmitBatchTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 提交离线计算任务。
 *
 * @param request SubmitBatchTaskRequest
 * @return SubmitBatchTaskResponse
 */
async function submitBatchTask(request: SubmitBatchTaskRequest): SubmitBatchTaskResponse {
  var runtime = new $RuntimeOptions{};
  return submitBatchTaskWithOptions(request, runtime);
}

model SyncDepartmentRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  syncDepartmentCommand?: {
    departmentList?: [ 
      {
        departmentId?: string(name='DepartmentId', description='This parameter is required.', example='10001'),
        departmentName?: string(name='DepartmentName', description='This parameter is required.', example='研发中心'),
        parentDepartmentId?: string(name='ParentDepartmentId', example='10001'),
      }
    ](name='DepartmentList', description='This parameter is required.'),
  }(name='SyncDepartmentCommand', description='This parameter is required.'),
}

model SyncDepartmentShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  syncDepartmentCommandShrink?: string(name='SyncDepartmentCommand', description='This parameter is required.'),
}

model SyncDepartmentResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model SyncDepartmentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SyncDepartmentResponseBody(name='body'),
}

/**
 * @summary 同步部门信息
 *
 * @param tmpReq SyncDepartmentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SyncDepartmentResponse
 */
async function syncDepartmentWithOptions(tmpReq: SyncDepartmentRequest, runtime: $RuntimeOptions): SyncDepartmentResponse {
  tmpReq.validate();
  var request = new SyncDepartmentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.syncDepartmentCommand)) {
    request.syncDepartmentCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.syncDepartmentCommand, 'SyncDepartmentCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.syncDepartmentCommandShrink)) {
    body['SyncDepartmentCommand'] = request.syncDepartmentCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'SyncDepartment',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 同步部门信息
 *
 * @param request SyncDepartmentRequest
 * @return SyncDepartmentResponse
 */
async function syncDepartment(request: SyncDepartmentRequest): SyncDepartmentResponse {
  var runtime = new $RuntimeOptions{};
  return syncDepartmentWithOptions(request, runtime);
}

model SyncDepartmentUserRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  syncDepartmentUserCommand?: {
    deptUserMapping?: [ 
      {
        departmentIdList?: [ string ](name='DepartmentIdList'),
        sourceUserId?: string(name='SourceUserId', description='This parameter is required.', example='30000001'),
      }
    ](name='DeptUserMapping', description='This parameter is required.'),
  }(name='SyncDepartmentUserCommand', description='This parameter is required.'),
}

model SyncDepartmentUserShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  syncDepartmentUserCommandShrink?: string(name='SyncDepartmentUserCommand', description='This parameter is required.'),
}

model SyncDepartmentUserResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model SyncDepartmentUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SyncDepartmentUserResponseBody(name='body'),
}

/**
 * @summary 同步部门成员信息
 *
 * @param tmpReq SyncDepartmentUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SyncDepartmentUserResponse
 */
async function syncDepartmentUserWithOptions(tmpReq: SyncDepartmentUserRequest, runtime: $RuntimeOptions): SyncDepartmentUserResponse {
  tmpReq.validate();
  var request = new SyncDepartmentUserShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.syncDepartmentUserCommand)) {
    request.syncDepartmentUserCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.syncDepartmentUserCommand, 'SyncDepartmentUserCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.syncDepartmentUserCommandShrink)) {
    body['SyncDepartmentUserCommand'] = request.syncDepartmentUserCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'SyncDepartmentUser',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 同步部门成员信息
 *
 * @param request SyncDepartmentUserRequest
 * @return SyncDepartmentUserResponse
 */
async function syncDepartmentUser(request: SyncDepartmentUserRequest): SyncDepartmentUserResponse {
  var runtime = new $RuntimeOptions{};
  return syncDepartmentUserWithOptions(request, runtime);
}

model UpdateAdHocFileRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    content?: string(name='Content', description='This parameter is required.', example='select 1;'),
    fileId?: long(name='FileId', description='This parameter is required.', example='2311113'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='1212313'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateAdHocFileShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateAdHocFileResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateAdHocFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAdHocFileResponseBody(name='body'),
}

/**
 * @summary 编辑即席查询文件。
 *
 * @param tmpReq UpdateAdHocFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAdHocFileResponse
 */
async function updateAdHocFileWithOptions(tmpReq: UpdateAdHocFileRequest, runtime: $RuntimeOptions): UpdateAdHocFileResponse {
  tmpReq.validate();
  var request = new UpdateAdHocFileShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateAdHocFile',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑即席查询文件。
 *
 * @param request UpdateAdHocFileRequest
 * @return UpdateAdHocFileResponse
 */
async function updateAdHocFile(request: UpdateAdHocFileRequest): UpdateAdHocFileResponse {
  var runtime = new $RuntimeOptions{};
  return updateAdHocFileWithOptions(request, runtime);
}

model UpdateBatchTaskRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    code?: string(name='Code', description='This parameter is required.', example='show tables;'),
    cronExpression?: string(name='CronExpression', example='0 0 1 * * ?'),
    customScheduleConfig?: {
      endTime?: string(name='EndTime', description='This parameter is required.', example='20:59'),
      interval?: int32(name='Interval', description='This parameter is required.', example='1'),
      intervalUnit?: string(name='IntervalUnit', description='This parameter is required.', example='HOUR'),
      schedulePeriod?: string(name='SchedulePeriod', description='This parameter is required.', example='DAILY'),
      startTime?: string(name='StartTime', description='This parameter is required.', example='08:00'),
    }(name='CustomScheduleConfig'),
    dataSourceCatalog?: string(name='DataSourceCatalog', example='mysql_catalog'),
    dataSourceId?: string(name='DataSourceId', example='12131111'),
    dataSourceSchema?: string(name='DataSourceSchema', example='erp'),
    engine?: string(name='Engine', example='PYTHON3_7'),
    fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
    name?: string(name='Name', description='This parameter is required.', example='test111'),
    nodeDescription?: string(name='NodeDescription', example='xx测试'),
    nodeOutputNameList?: [ string ](name='NodeOutputNameList'),
    nodeStatus?: int32(name='NodeStatus', example='1'),
    paramList?: [ 
      {
        key?: string(name='Key', description='This parameter is required.', example='key'),
        value?: string(name='Value', description='This parameter is required.', example='value'),
      }
    ](name='ParamList'),
    priority?: int32(name='Priority', example='1'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='10121101'),
    pythonModuleList?: [ string ](name='PythonModuleList'),
    schedulePeriod?: string(name='SchedulePeriod', example='DAILY'),
    sparkClientInfo?: {
      sparkClientVersion?: string(name='SparkClientVersion', description='This parameter is required.', example='abc'),
    }(name='SparkClientInfo'),
    taskType?: int32(name='TaskType', description='This parameter is required.', example='21'),
    upStreamList?: [ 
      {
        dependPeriod?: {
          periodOffset?: int32(name='PeriodOffset', example='1'),
          periodType?: string(name='PeriodType', description='This parameter is required.', example='CURRENT_PERIOD'),
        }(name='DependPeriod'),
        dependStrategy?: string(name='DependStrategy', example='LAST'),
        fieldList?: [ string ](name='FieldList'),
        nodeType?: string(name='NodeType', example='PHYSICAL'),
        periodDiff?: int32(name='PeriodDiff', description='This parameter is required.', example='1'),
        sourceNodeEnabled?: boolean(name='SourceNodeEnabled'),
        sourceNodeId?: string(name='SourceNodeId', example='n_2001'),
        sourceNodeOutputName?: string(name='SourceNodeOutputName', description='This parameter is required.', example='t_input1'),
        sourceTableName?: string(name='SourceTableName', example='t_input1'),
      }
    ](name='UpStreamList'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBatchTaskShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBatchTaskResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
  updateResult?: {
    fileId?: long(name='FileId', example='12113111'),
  }(name='UpdateResult'),
}

model UpdateBatchTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateBatchTaskResponseBody(name='body'),
}

/**
 * @summary 编辑离线计算任务。
 *
 * @param tmpReq UpdateBatchTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateBatchTaskResponse
 */
async function updateBatchTaskWithOptions(tmpReq: UpdateBatchTaskRequest, runtime: $RuntimeOptions): UpdateBatchTaskResponse {
  tmpReq.validate();
  var request = new UpdateBatchTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateBatchTask',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑离线计算任务。
 *
 * @param request UpdateBatchTaskRequest
 * @return UpdateBatchTaskResponse
 */
async function updateBatchTask(request: UpdateBatchTaskRequest): UpdateBatchTaskResponse {
  var runtime = new $RuntimeOptions{};
  return updateBatchTaskWithOptions(request, runtime);
}

model UpdateBatchTaskUdfLineagesRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    fileId?: long(name='FileId', description='This parameter is required.', example='12113111'),
    lineageGroupList?: [ 
      {
        inputLineageList?: [ 
          {
            columnList?: [ string ](name='ColumnList', description='This parameter is required.'),
            env?: string(name='Env', description='This parameter is required.', example='dev'),
            fullTable?: boolean(name='FullTable', description='This parameter is required.'),
            name?: string(name='Name', description='This parameter is required.', example='t_input'),
          }
        ](name='InputLineageList', description='This parameter is required.'),
        outputLineageList?: [ 
          {
            columnList?: [ string ](name='ColumnList', description='This parameter is required.'),
            env?: string(name='Env', description='This parameter is required.', example='dev'),
            fullTable?: boolean(name='FullTable', description='This parameter is required.'),
            name?: string(name='Name', description='This parameter is required.', example='t_output'),
          }
        ](name='OutputLineageList', description='This parameter is required.'),
      }
    ](name='LineageGroupList', description='This parameter is required.'),
    projectId?: long(name='ProjectId', description='This parameter is required.', example='131211211'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBatchTaskUdfLineagesShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBatchTaskUdfLineagesResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateBatchTaskUdfLineagesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateBatchTaskUdfLineagesResponseBody(name='body'),
}

/**
 * @summary 编辑离线计算任务自定义血缘。
 *
 * @param tmpReq UpdateBatchTaskUdfLineagesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateBatchTaskUdfLineagesResponse
 */
async function updateBatchTaskUdfLineagesWithOptions(tmpReq: UpdateBatchTaskUdfLineagesRequest, runtime: $RuntimeOptions): UpdateBatchTaskUdfLineagesResponse {
  tmpReq.validate();
  var request = new UpdateBatchTaskUdfLineagesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateBatchTaskUdfLineages',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑离线计算任务自定义血缘。
 *
 * @param request UpdateBatchTaskUdfLineagesRequest
 * @return UpdateBatchTaskUdfLineagesResponse
 */
async function updateBatchTaskUdfLineages(request: UpdateBatchTaskUdfLineagesRequest): UpdateBatchTaskUdfLineagesResponse {
  var runtime = new $RuntimeOptions{};
  return updateBatchTaskUdfLineagesWithOptions(request, runtime);
}

model UpdateBizEntityRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    bizObject?: {
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', description='This parameter is required.', example='create_object_name'),
      name?: string(name='Name', description='This parameter is required.', example='create_object_code_name'),
      ownerUserId?: string(name='OwnerUserId', description='This parameter is required.', example='30010010'),
      parentId?: long(name='ParentId', example='116306'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
    }(name='BizObject'),
    bizProcess?: {
      bizEventEntityIdList?: [ long ](name='BizEventEntityIdList'),
      description?: string(name='Description', example='test'),
      displayName?: string(name='DisplayName', description='This parameter is required.', example='create_process_name'),
      name?: string(name='Name', description='This parameter is required.', example='create_process_code_name'),
      ownerUserId?: string(name='OwnerUserId', description='This parameter is required.', example='30010010'),
      preBizProcessIdList?: [ long ](name='PreBizProcessIdList'),
      refBizEntityIdList?: [ long ](name='RefBizEntityIdList'),
    }(name='BizProcess'),
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='6798087749072704'),
    dataDomainId?: long(name='DataDomainId', description='This parameter is required.', example='20101011'),
    id?: long(name='Id', description='This parameter is required.', example='101001201'),
    type?: string(name='Type', description='This parameter is required.', example='BIZ_OBJECT'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBizEntityShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBizEntityResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateBizEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateBizEntityResponseBody(name='body'),
}

/**
 * @summary 更新业务实体、
 *
 * @param tmpReq UpdateBizEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateBizEntityResponse
 */
async function updateBizEntityWithOptions(tmpReq: UpdateBizEntityRequest, runtime: $RuntimeOptions): UpdateBizEntityResponse {
  tmpReq.validate();
  var request = new UpdateBizEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateBizEntity',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新业务实体、
 *
 * @param request UpdateBizEntityRequest
 * @return UpdateBizEntityResponse
 */
async function updateBizEntity(request: UpdateBizEntityRequest): UpdateBizEntityResponse {
  var runtime = new $RuntimeOptions{};
  return updateBizEntityWithOptions(request, runtime);
}

model UpdateBizUnitRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    bizUnitAccountList?: [ 
      {
        userId?: string(name='UserId', description='This parameter is required.', example='20001201'),
      }
    ](name='BizUnitAccountList', description='This parameter is required.'),
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='545844456'),
    description?: string(name='Description', example='test'),
    displayName?: string(name='DisplayName', description='This parameter is required.', example='测试'),
    icon?: string(name='Icon', description='This parameter is required.', example='icon-environment'),
    name?: string(name='Name', description='This parameter is required.', example='bz_code_name'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBizUnitShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateBizUnitResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateBizUnitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateBizUnitResponseBody(name='body'),
}

/**
 * @summary 更新数据板块。
 *
 * @param tmpReq UpdateBizUnitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateBizUnitResponse
 */
async function updateBizUnitWithOptions(tmpReq: UpdateBizUnitRequest, runtime: $RuntimeOptions): UpdateBizUnitResponse {
  tmpReq.validate();
  var request = new UpdateBizUnitShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateBizUnit',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新数据板块。
 *
 * @param request UpdateBizUnitRequest
 * @return UpdateBizUnitResponse
 */
async function updateBizUnit(request: UpdateBizUnitRequest): UpdateBizUnitResponse {
  var runtime = new $RuntimeOptions{};
  return updateBizUnitWithOptions(request, runtime);
}

model UpdateDataDomainRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    abbreviation?: string(name='Abbreviation', description='This parameter is required.', example='dm_code_name'),
    bizUnitId?: long(name='BizUnitId', description='This parameter is required.', example='545844456'),
    dataDomainId?: long(name='DataDomainId', description='This parameter is required.', example='1241844456'),
    description?: string(name='Description', example='test'),
    displayName?: string(name='DisplayName', description='This parameter is required.', example='主题域测试'),
    name?: string(name='Name', description='This parameter is required.', example='dm_code_name'),
    parentId?: long(name='ParentId', example='10232311'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateDataDomainShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateDataDomainResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateDataDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDataDomainResponseBody(name='body'),
}

/**
 * @summary 更新主题域。
 *
 * @param tmpReq UpdateDataDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDataDomainResponse
 */
async function updateDataDomainWithOptions(tmpReq: UpdateDataDomainRequest, runtime: $RuntimeOptions): UpdateDataDomainResponse {
  tmpReq.validate();
  var request = new UpdateDataDomainShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateDataDomain',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新主题域。
 *
 * @param request UpdateDataDomainRequest
 * @return UpdateDataDomainResponse
 */
async function updateDataDomain(request: UpdateDataDomainRequest): UpdateDataDomainResponse {
  var runtime = new $RuntimeOptions{};
  return updateDataDomainWithOptions(request, runtime);
}

model UpdateDataSourceBasicInfoRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    description?: string(name='Description', description='This parameter is required.', example='xx'),
    id?: long(name='Id', description='This parameter is required.', example='23231'),
    name?: string(name='Name', description='This parameter is required.'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateDataSourceBasicInfoShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateDataSourceBasicInfoResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model UpdateDataSourceBasicInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDataSourceBasicInfoResponseBody(name='body'),
}

/**
 * @summary 编辑数据源基本信息
 *
 * @param tmpReq UpdateDataSourceBasicInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDataSourceBasicInfoResponse
 */
async function updateDataSourceBasicInfoWithOptions(tmpReq: UpdateDataSourceBasicInfoRequest, runtime: $RuntimeOptions): UpdateDataSourceBasicInfoResponse {
  tmpReq.validate();
  var request = new UpdateDataSourceBasicInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateDataSourceBasicInfo',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑数据源基本信息
 *
 * @param request UpdateDataSourceBasicInfoRequest
 * @return UpdateDataSourceBasicInfoResponse
 */
async function updateDataSourceBasicInfo(request: UpdateDataSourceBasicInfoRequest): UpdateDataSourceBasicInfoResponse {
  var runtime = new $RuntimeOptions{};
  return updateDataSourceBasicInfoWithOptions(request, runtime);
}

model UpdateDataSourceConfigRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    configItemList?: [ 
      {
        key?: string(name='Key', description='This parameter is required.', example='k1'),
        value?: string(name='Value', description='This parameter is required.', example='v1'),
      }
    ](name='ConfigItemList', description='This parameter is required.'),
    id?: long(name='Id', description='This parameter is required.', example='13231313'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateDataSourceConfigShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateDataSourceConfigResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model UpdateDataSourceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDataSourceConfigResponseBody(name='body'),
}

/**
 * @summary 编辑数据源连接配置项
 *
 * @param tmpReq UpdateDataSourceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDataSourceConfigResponse
 */
async function updateDataSourceConfigWithOptions(tmpReq: UpdateDataSourceConfigRequest, runtime: $RuntimeOptions): UpdateDataSourceConfigResponse {
  tmpReq.validate();
  var request = new UpdateDataSourceConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateDataSourceConfig',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑数据源连接配置项
 *
 * @param request UpdateDataSourceConfigRequest
 * @return UpdateDataSourceConfigResponse
 */
async function updateDataSourceConfig(request: UpdateDataSourceConfigRequest): UpdateDataSourceConfigResponse {
  var runtime = new $RuntimeOptions{};
  return updateDataSourceConfigWithOptions(request, runtime);
}

model UpdateFileDirectoryRequest {
  directory?: string(name='Directory', description='This parameter is required.', example='/xx测试/目录new'),
  fileId?: long(name='FileId', description='This parameter is required.', example='12121111'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='12132323'),
}

model UpdateFileDirectoryResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateFileDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateFileDirectoryResponseBody(name='body'),
}

/**
 * @summary 修改菜单树文件所在目录
 *
 * @param request UpdateFileDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateFileDirectoryResponse
 */
async function updateFileDirectoryWithOptions(request: UpdateFileDirectoryRequest, runtime: $RuntimeOptions): UpdateFileDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.directory)) {
    query['Directory'] = request.directory;
  }
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateFileDirectory',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改菜单树文件所在目录
 *
 * @param request UpdateFileDirectoryRequest
 * @return UpdateFileDirectoryResponse
 */
async function updateFileDirectory(request: UpdateFileDirectoryRequest): UpdateFileDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return updateFileDirectoryWithOptions(request, runtime);
}

model UpdateFileNameRequest {
  fileId?: long(name='FileId', description='This parameter is required.', example='12121111'),
  name?: string(name='Name', description='This parameter is required.', example='xxNew'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  projectId?: long(name='ProjectId', description='This parameter is required.', example='12132323'),
}

model UpdateFileNameResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success'),
}

model UpdateFileNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateFileNameResponseBody(name='body'),
}

/**
 * @summary 修改菜单树文件名称
 *
 * @param request UpdateFileNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateFileNameResponse
 */
async function updateFileNameWithOptions(request: UpdateFileNameRequest, runtime: $RuntimeOptions): UpdateFileNameResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateFileName',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改菜单树文件名称
 *
 * @param request UpdateFileNameRequest
 * @return UpdateFileNameResponse
 */
async function updateFileName(request: UpdateFileNameRequest): UpdateFileNameResponse {
  var runtime = new $RuntimeOptions{};
  return updateFileNameWithOptions(request, runtime);
}

model UpdateRowPermissionRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateRowPermissionCommand?: {
    mappingColumns?: [ 
      {
        columnDesc?: string(name='ColumnDesc'),
        columnName?: string(name='ColumnName', description='This parameter is required.', example='business_id'),
        columnType?: string(name='ColumnType', description='This parameter is required.', example='STRING'),
      }
    ](name='MappingColumns', description='This parameter is required.'),
    rowPermissionDesc?: string(name='RowPermissionDesc'),
    rowPermissionId?: long(name='RowPermissionId', description='This parameter is required.', example='30009999'),
    rowPermissionName?: string(name='RowPermissionName', description='This parameter is required.'),
    rules?: [ 
      {
        expressions?: [ 
          {
            mappingColumnName?: string(name='MappingColumnName', description='This parameter is required.', example='business_id'),
            operator?: string(name='Operator', description='This parameter is required.', example='OR'),
            subConditions?: [ any ](name='SubConditions', description='This parameter is required.'),
            type?: string(name='Type', description='This parameter is required.', example='EXPRESSION'),
            values?: [ string ](name='Values', description='This parameter is required.'),
          }
        ](name='Expressions', description='This parameter is required.'),
        isDelete?: boolean(name='IsDelete', example='0'),
        ruleName?: string(name='RuleName', description='This parameter is required.'),
        scopeType?: string(name='ScopeType', description='This parameter is required.', example='SELECT_COLUMN'),
        status?: int32(name='Status', description='This parameter is required.', example='1'),
        userMappingList?: [ 
          {
            accountType?: string(name='AccountType', description='This parameter is required.', example='PERSONAL'),
            accounts?: [ 
              {
                accountId?: string(name='AccountId', description='This parameter is required.', example='30001011'),
              }
            ](name='Accounts', description='This parameter is required.'),
          }
        ](name='UserMappingList'),
      }
    ](name='Rules'),
    tables?: [ 
      {
        columnName?: string(name='ColumnName', description='This parameter is required.', example='business_id'),
        mappingColumnName?: string(name='MappingColumnName', description='This parameter is required.', example='business_id'),
        resourceId?: string(name='ResourceId', description='This parameter is required.', example='odps.300199897.project_name.table_name'),
      }
    ](name='Tables'),
  }(name='UpdateRowPermissionCommand', description='This parameter is required.'),
}

model UpdateRowPermissionShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateRowPermissionCommandShrink?: string(name='UpdateRowPermissionCommand', description='This parameter is required.'),
}

model UpdateRowPermissionResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model UpdateRowPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRowPermissionResponseBody(name='body'),
}

/**
 * @summary 更新行级权限
 *
 * @param tmpReq UpdateRowPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRowPermissionResponse
 */
async function updateRowPermissionWithOptions(tmpReq: UpdateRowPermissionRequest, runtime: $RuntimeOptions): UpdateRowPermissionResponse {
  tmpReq.validate();
  var request = new UpdateRowPermissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateRowPermissionCommand)) {
    request.updateRowPermissionCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateRowPermissionCommand, 'UpdateRowPermissionCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateRowPermissionCommandShrink)) {
    body['UpdateRowPermissionCommand'] = request.updateRowPermissionCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateRowPermission',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新行级权限
 *
 * @param request UpdateRowPermissionRequest
 * @return UpdateRowPermissionResponse
 */
async function updateRowPermission(request: UpdateRowPermissionRequest): UpdateRowPermissionResponse {
  var runtime = new $RuntimeOptions{};
  return updateRowPermissionWithOptions(request, runtime);
}

model UpdateTenantMemberRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    memberList?: [ 
      {
        dingNumber?: string(name='DingNumber', example='123@dingding'),
        mail?: string(name='Mail', example='123@xx.com'),
        mobilePhone?: string(name='MobilePhone', example='13888888888'),
        roleList?: [ string ](name='RoleList'),
        userId?: string(name='UserId', example='2331'),
      }
    ](name='MemberList', description='This parameter is required.'),
  }(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateTenantMemberShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand', description='This parameter is required.'),
}

model UpdateTenantMemberResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model UpdateTenantMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateTenantMemberResponseBody(name='body'),
}

/**
 * @summary 编辑租户成员
 *
 * @param tmpReq UpdateTenantMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateTenantMemberResponse
 */
async function updateTenantMemberWithOptions(tmpReq: UpdateTenantMemberRequest, runtime: $RuntimeOptions): UpdateTenantMemberResponse {
  tmpReq.validate();
  var request = new UpdateTenantMemberShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateTenantMember',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑租户成员
 *
 * @param request UpdateTenantMemberRequest
 * @return UpdateTenantMemberResponse
 */
async function updateTenantMember(request: UpdateTenantMemberRequest): UpdateTenantMemberResponse {
  var runtime = new $RuntimeOptions{};
  return updateTenantMemberWithOptions(request, runtime);
}

model UpdateUserGroupRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommand?: {
    adminUserIdList?: [ string ](name='AdminUserIdList'),
    description?: string(name='Description', example='xx'),
    id?: string(name='Id', description='This parameter is required.', example='13423'),
    name?: string(name='Name'),
  }(name='UpdateCommand'),
}

model UpdateUserGroupShrinkRequest {
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  updateCommandShrink?: string(name='UpdateCommand'),
}

model UpdateUserGroupResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model UpdateUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserGroupResponseBody(name='body'),
}

/**
 * @summary 编辑用户组.
 *
 * @param tmpReq UpdateUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserGroupResponse
 */
async function updateUserGroupWithOptions(tmpReq: UpdateUserGroupRequest, runtime: $RuntimeOptions): UpdateUserGroupResponse {
  tmpReq.validate();
  var request = new UpdateUserGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.updateCommand)) {
    request.updateCommandShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateCommand, 'UpdateCommand', 'json');
  }
  var query = {};
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.updateCommandShrink)) {
    body['UpdateCommand'] = request.updateCommandShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUserGroup',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑用户组.
 *
 * @param request UpdateUserGroupRequest
 * @return UpdateUserGroupResponse
 */
async function updateUserGroup(request: UpdateUserGroupRequest): UpdateUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return updateUserGroupWithOptions(request, runtime);
}

model UpdateUserGroupSwitchRequest {
  active?: boolean(name='Active', description='This parameter is required.', example='true'),
  opTenantId?: long(name='OpTenantId', description='This parameter is required.', example='30001011'),
  userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='31323'),
}

model UpdateUserGroupSwitchResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='75DD06F8-1661-5A6E-B0A6-7E23133BDC60'),
  success?: boolean(name='Success', example='true'),
}

model UpdateUserGroupSwitchResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserGroupSwitchResponseBody(name='body'),
}

/**
 * @summary 编辑用户组启用开关.
 *
 * @param request UpdateUserGroupSwitchRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserGroupSwitchResponse
 */
async function updateUserGroupSwitchWithOptions(request: UpdateUserGroupSwitchRequest, runtime: $RuntimeOptions): UpdateUserGroupSwitchResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.active)) {
    query['Active'] = request.active;
  }
  if (!$isNull(request.opTenantId)) {
    query['OpTenantId'] = request.opTenantId;
  }
  if (!$isNull(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUserGroupSwitch',
    version = '2023-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑用户组启用开关.
 *
 * @param request UpdateUserGroupSwitchRequest
 * @return UpdateUserGroupSwitchResponse
 */
async function updateUserGroupSwitch(request: UpdateUserGroupSwitchRequest): UpdateUserGroupSwitchResponse {
  var runtime = new $RuntimeOptions{};
  return updateUserGroupSwitchWithOptions(request, runtime);
}

